UNPKG

apitally

Version:

Simple API monitoring & analytics for REST APIs built with Express, Fastify, NestJS, AdonisJS, Hono, H3, Elysia, Hapi, and Koa.

16 lines (14 loc) 513 B
type CaptureResponseOptions = { captureBody: boolean; maxBodySize: number; readTimeout: number; }; type CapturedResponse = { body?: Buffer; size: number; completed: boolean; error?: Error; }; declare function captureResponse(response: Response, { captureBody, maxBodySize, readTimeout, }?: Partial<CaptureResponseOptions>): [Response, Promise<CapturedResponse>]; declare function getResponseJson(body: Buffer): any; export { type CapturedResponse, captureResponse, getResponseJson };