Skip to content

Commit

Permalink
Add information about removed body type to the v3 upgrade guide
Browse files Browse the repository at this point in the history
  • Loading branch information
xxczaki committed Feb 20, 2020
1 parent 1f119f1 commit acca53f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/v3-UPGRADE-GUIDE.md
Expand Up @@ -59,6 +59,10 @@ fetch("https://somewebsitereturninginvalidjson.com").then(res => res.json())

If you are listening for errors via `res.body.on('error', () => ...)`, replace it with `res.body.once('error', () => ...)` so that your callback is not [fired twice](https://github.com/node-fetch/node-fetch/issues/668#issuecomment-569386115) in NodeJS >=13.5.

## `req.body` can no longer be a string

We are working towards changing body to become either null or a stream.

## Changed default user agent

The default user agent has been changed from `node-fetch/1.0 (+https://github.com/node-fetch/node-fetch)` to `node-fetch (+https://github.com/node-fetch/node-fetch)`.
Expand Down

3 comments on commit acca53f

@GrosSacASac
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The future tense is so confusing, are you working towards or is it already the case ?

@GrosSacASac
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jimmywarting
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#924 normalize the body to a node stream. not publish yet...

Please sign in to comment.