Skip to content

Commit 38983ff

Browse files
committed
fix: fetch body is not Readable
It's much easier to implement spec compliant fetch API if we don't try to be node streams at the same time.
1 parent 26227a2 commit 38983ff

8 files changed

Lines changed: 268 additions & 183 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ https://fetch.spec.whatwg.org/
161161

162162
Implements [fetch](https://fetch.spec.whatwg.org/).
163163

164+
Only supported on Node 16+.
165+
164166
This is [experimental](https://nodejs.org/api/documentation.html#documentation_stability_index) and is not yet fully compliant the Fetch Standard. We plan to ship breaking changes to this feature until it is out of experimental.
165167

166168
Arguments:

docs/api/Dispatcher.md

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -307,36 +307,11 @@ client.dispatch({
307307

308308
### `Dispatcher.fetch(options)`
309309

310-
Performs a HTTP request.
311-
312310
Implements [fetch](https://fetch.spec.whatwg.org/).
313311

314-
This is [experimental](https://nodejs.org/api/documentation.html#documentation_stability_index) and is not yet fully compliant the Fetch Standard. We plan to ship breaking changes to this feature until it is out of experimental.
315-
316-
Arguments:
317-
318-
* **options** `FetchOptions`
319-
320-
Returns: `Promise<FetchResponse>`
312+
Only supported on Node 16+.
321313

322-
#### Parameter: `FetchOptions`
323-
324-
Extends: [`DispatchOptions`](#parameter-dispatchoptions)
325-
326-
**headers** `HeadersInit`
327-
**body** `BodyInit?`
328-
**keepalive** `boolean`
329-
**signal** `AbortSignal?`
330-
331-
#### Parameter: `FetchResponse`
332-
333-
* **type** `ResponseType`
334-
* **url** `string`
335-
* **redirected** `boolean`
336-
* **status** `number`
337-
* **ok** `boolean`
338-
* **statusText** `string` Always empty string.
339-
* **headers** `Headers`
314+
This is [experimental](https://nodejs.org/api/documentation.html#documentation_stability_index) and is not yet fully compliant the Fetch Standard. We plan to ship breaking changes to this feature until it is out of experimental.
340315

341316
### `Dispatcher.pipeline(options, handler)`
342317

0 commit comments

Comments
 (0)