web-std-io
web-std-io copied to clipboard
feat: add Response.json static method
https://github.com/remix-run/remix/discussions/3308
======================================================================================
confirmed working with npm link and importing Response from @remix-run/web-fetch
🦋 Changeset detected
Latest commit: 7c9a52518b261e47dec483201c8bd985f3f4420b
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @remix-run/web-fetch | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
As far as I know, there's no Response.json static method on the Fetch API Response class. If this is a convenience feature, I'd highly encourage you not to add it to the Response class directly.
I'm solving a similar convenience issue in MSW, and you can draw some inspiration from there.
it's in the spec and implemented in chrome, so it really just makes our polyfill closer to the spec
@mcansh, a good point, I must've been using a really old version of Chrome so it didn't show up when I checked this. Thanks for correcting me!