Skip to content

Commit 34e708c

Browse files
nodejs-github-botdanielleadams
authored andcommittedJan 3, 2023
deps: update undici to 5.13.0
PR-URL: #45634 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>
1 parent fa8caa3 commit 34e708c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1080
-1341
lines changed
 

‎deps/undici/src/README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,6 @@ Implements [fetch](https://fetch.spec.whatwg.org/#fetch-method).
178178

179179
Only supported on Node 16.8+.
180180

181-
This is [experimental](https://nodejs.org/api/documentation.html#documentation_stability_index) and is not yet fully compliant with the Fetch Standard.
182-
We plan to ship breaking changes to this feature until it is out of experimental.
183-
Help us improve the test coverage by following instructions at [nodejs/undici/#951](https://github.com/nodejs/undici/issues/951).
184-
185181
Basic usage example:
186182

187183
```js
@@ -234,9 +230,15 @@ const data = {
234230
},
235231
}
236232

237-
await fetch('https://example.com', { body: data, method: 'POST' })
233+
await fetch('https://example.com', { body: data, method: 'POST', duplex: 'half' })
238234
```
239235

236+
#### `request.duplex`
237+
238+
- half
239+
240+
In this implementation of fetch, `request.duplex` must be set if `request.body` is `ReadableStream` or `Async Iterables`. And fetch requests are currently always be full duplex. More detail refer to [Fetch Standard.](https://fetch.spec.whatwg.org/#dom-requestinit-duplex)
241+
240242
#### `response.body`
241243

242244
Nodejs has two kinds of streams: [web streams](https://nodejs.org/dist/latest-v16.x/docs/api/webstreams.html), which follow the API of the WHATWG web standard found in browsers, and an older Node-specific [streams API](https://nodejs.org/api/stream.html). `response.body` returns a readable web stream. If you would prefer to work with a Node stream you can convert a web stream using `.fromWeb()`.
-28.6 KB
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.