Skip to content

Commit c2bea30

Browse files
committed
Fix example in README
1 parent daa402c commit c2bea30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/node-fetch-server/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ let handler: FetchHandler = (request, client) => {
7272

7373
In addition to the high-level `createRequestListener()` API, this package also provides 2 low-level APIs that are useful when building custom `fetch`-based servers in Node.js:
7474

75-
- `createRequest(req: http.IncomingMessage, options: RequestOptions): Request`
75+
- `createRequest(req: http.IncomingMessage, res: http.ServerResponse, options: RequestOptions): Request`
7676
- `sendResponse(res: http.ServerResponse, response: Response): Promise<void>`
7777

7878
These two functions serve as an efficient, minimal translation layer between Node.js `req`/`res` objects and fetch `Request`/`Response` objects. You could build your own custom server like this:

0 commit comments

Comments
 (0)