Created
February 11, 2018 01:52
-
-
Save jamesplease/ef1f3670a437cf11a31fd28984f60df2 to your computer and use it in GitHub Desktop.
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
fetch('https://jsonplaceholder.typicode.com/posts/1') | |
.then(res => { | |
const text = res.text(); | |
console.log(res.bodyUsed); | |
// => true | |
var newResponse = new Response(res.body, res); | |
console.log(newResponse.bodyUsed); | |
// => `true` if using Chrome, `false` if using Safari, Firefox, or node-fetch | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment