Use new Response.json() static method #3308
Replies: 3 comments 1 reply
-
I just realized that @mjackson already commented on the whatwg issue: whatwg/fetch#1389 (comment) |
Beta Was this translation helpful? Give feedback.
-
This should be super simple to add, we could also support Response.redirect and still have redirect as a way to create one with the ResponseInit if you need it. |
Beta Was this translation helpful? Give feedback.
-
You're certainly welcome to use It's a shame |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
There may be an opportunity to bring Remix closer to the web platform by utilizing the new
Response.json()
static method that was recently added to the fetch specification. Deno recently added support. This might be a good time to deprecate thejson
helper exported by Remix as well.See:
Response.json
helper whatwg/fetch#1389There's might be a similar method for
Response.redirect()
as well, but it doesn't support passing in aResponseInit
: https://developer.mozilla.org/en-US/docs/Web/API/Response/redirectBeta Was this translation helpful? Give feedback.
All reactions