-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The conventions in the Fetch API is that you make a request, then do something with the body: ```javascript const result = await fetch('...') const data = await result.json() ``` It doesn't do things like: ```javascript const data = await fetch.json('...') ``` This PR brings our API more inline with Fetch so where we used to do: ```javascript for await (const datum of http.ndjson('...')) { // what method does this use? }) `` We now do the more idiomatic: ```javascript const result = await http.post('...') for await (const datum of result.ndjson()) { } ```` It also removes the `.iterator` and `.stream` methods as they do not follow the Fetch pattern either.
- Loading branch information
1 parent
03e1dd3
commit acbf480
Showing
2 changed files
with
27 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters