http-proxy-middleware
Version:
The one-liner node.js proxy middleware for connect, express, next.js and more
9 lines (8 loc) • 322 B
TypeScript
import type * as http from 'node:http';
export type BodyParserLikeRequest = http.IncomingMessage & {
body?: any;
};
/**
* Fix proxied body if bodyParser is involved.
*/
export declare function fixRequestBody<TReq extends BodyParserLikeRequest = BodyParserLikeRequest>(proxyReq: http.ClientRequest, req: TReq): void;