import type { NodeIncomingMessage } from "./node-types.js"; /** * Convert a Node `http.IncomingMessage` into a WHATWG `Request`. * * A Node request is a readable stream of body bytes. When a streaming body is * supplied to the `Request` constructor (e.g. under Node's built-in fetch / * undici), the spec requires `duplex: "half"` — without it the constructor * throws `TypeError: RequestInit: duplex option is required when sending a * body.`, which previously surfaced as a generic 500 for every POST/PUT/etc. * * Bodyless methods (`GET`/`HEAD`/`OPTIONS`) must not attach a body at all; * `OPTIONS` in particular is used for CORS preflights and carries no body. */ export declare function convertNodeRequestToWebRequest(req: NodeIncomingMessage, url: string): Request; /** * Build the `RequestInit` for a Node request. Exposed so tests can observe the * `duplex` option, which the constructed `Request` does not reveal. * @internal */ export declare function buildNodeRequestInit(req: NodeIncomingMessage): RequestInit & { duplex?: "half"; }; //# sourceMappingURL=request-adapter.d.ts.map