Skip to content

feat(fetch): add Response.json static method #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mcansh
Copy link
Collaborator

@mcansh mcansh commented May 25, 2022

remix-run/remix#3308

======================================================================================

confirmed working with npm link and importing Response from @remix-run/web-fetch

image

@changeset-bot
Copy link

changeset-bot bot commented May 25, 2022

🦋 Changeset detected

Latest commit: 857eec9

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

@mcansh mcansh force-pushed the logan/response.json branch from d819f93 to f8855c9 Compare May 25, 2022 21:37
@kettanaito
Copy link

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.

@mcansh
Copy link
Collaborator Author

mcansh commented Oct 14, 2022

it's in the spec and implemented in chrome, so it really just makes our polyfill closer to the spec

@kettanaito
Copy link

@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!

@mcansh mcansh force-pushed the logan/response.json branch from d661763 to 3f363c1 Compare November 6, 2023 23:07
@mcansh mcansh marked this pull request as ready for review November 6, 2023 23:36
@MichaelDeBoey MichaelDeBoey changed the title feat: add Response.json static method feat(fetch): add Response.json static method Apr 7, 2025
mcansh added 5 commits April 7, 2025 14:26
Signed-off-by: Logan McAnsh <[email protected]>
[skip ci]

Signed-off-by: Logan McAnsh <[email protected]>
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants