Poq.SDK.Node

Home > @poq/nestjs-proxy > fixRequestBody

fixRequestBody variable

Transform body from object representation to string format.

Signature:

fixRequestBody: (proxyReq: ClientRequest, request: IncomingMessage) => void

Remarks

Some applications tend to use body parser middleware to transform raw body binary data into javascript object. For request methods that can contain body parameter proxy will fail when body is not in expected format. This helps to fix the problem with body parsers.