You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Response contructor is incompatible with other browser implementations #576
Thanks for reporting! In the meantime, I think you can use new Response(undefined, {status: 204}) as a workaround in your app. It's a shame null doesn't work in Firefox; is this known to Mozilla?
so my original assumption that doing new Response(options) works on other browsers. it actually returns a response that is a 200, no matter if you did 204 or 400. so it will always be resp.ok
changed the title [-]new Response contructor is incompatible with other browser implementations[/-][+]Response contructor is incompatible with other browser implementations[/+]on Oct 28, 2017
Activity
spearmootz commentedon Oct 23, 2017
i get around it with the following code.
mislav commentedon Oct 27, 2017
Thanks for reporting! In the meantime, I think you can use
new Response(undefined, {status: 204})as a workaround in your app. It's a shame null doesn't work in Firefox; is this known to Mozilla?spearmootz commentedon Oct 27, 2017
so my original assumption that doing new Response(options) works on other browsers. it actually returns a response that is a 200, no matter if you did 204 or 400. so it will always be resp.ok
[-]new Response contructor is incompatible with other browser implementations[/-][+]Response contructor is incompatible with other browser implementations[/+]dgraham commentedon Oct 28, 2017
Reopening to track updating our
Responseconstructor to match the specification changes.We need to handle the optional first
BodyInitargument here.https://github.com/github/fetch/blob/7a692dc519a3a110526a26c7e252f99991510c2a/fetch.js#L377-L380
Match spec behavior re: unsupported body type