Skip to content

Commit

Permalink
Merge pull request javascript-tutorial#2649 from ZYinMD/patch-20
Browse files Browse the repository at this point in the history
Add 1 letter in 5-network/03-fetch-progress
  • Loading branch information
iliakan authored Jul 22, 2021
2 parents 0082fbe + d7c2f08 commit 173ce27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 5-network/03-fetch-progress/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The `fetch` method allows to track *download* progress.

Please note: there's currently no way for `fetch` to track *upload* progress. For that purpose, please use [XMLHttpRequest](info:xmlhttprequest), we'll cover it later.

To track download progress, we can use `response.body` property. It's `ReadableStream` -- a special object that provides body chunk-by-chunk, as it comes. Readable streams are described in the [Streams API](https://streams.spec.whatwg.org/#rs-class) specification.
To track download progress, we can use `response.body` property. It's a `ReadableStream` -- a special object that provides body chunk-by-chunk, as it comes. Readable streams are described in the [Streams API](https://streams.spec.whatwg.org/#rs-class) specification.

Unlike `response.text()`, `response.json()` and other methods, `response.body` gives full control over the reading process, and we can count how much is consumed at any moment.

Expand Down

0 comments on commit 173ce27

Please sign in to comment.