Skip to content
tRPC

Partners

Function: incomingMessageToRequest()

On this page

incomingMessageToRequest(req, res, opts): Request

Defined in: packages/server/src/adapters/node-http/incomingMessageToRequest.ts:147

Turns a Node.js IncomingMessage into a Fetch API Request. The request's signal aborts when the client disconnects.

Parameters

ParameterTypeDescription
reqNodeHTTPRequest-
resNodeHTTPResponse-
opts{ maxBodySize: null | number; }-
opts.maxBodySizenull | numberMax body size in bytes. If the body is larger than this, the request will be aborted

Returns

Request