You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -185,12 +185,12 @@ Help us improve the test coverage by following instructions at [nodejs/undici/#9
185
185
Basic usage example:
186
186
187
187
```js
188
-
import { fetch } from'undici';
188
+
import { fetch } from'undici'
189
189
190
190
191
191
constres=awaitfetch('https://example.com')
192
192
constjson=awaitres.json()
193
-
console.log(json);
193
+
console.log(json)
194
194
```
195
195
196
196
You can pass an optional dispatcher to `fetch` as:
@@ -225,29 +225,29 @@ A body can be of the following types:
225
225
In this implementation of fetch, ```request.body``` now accepts ```Async Iterables```. It is not present in the [Fetch Standard.](https://fetch.spec.whatwg.org)
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()`.
0 commit comments