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
returns hello world (without quotations) and a text/plain content type header. If you try to parse that JSON it will fail. It should return "hello world", with quotations, which will parse correctly.
I think this is because createResponseType(...) only calls JSON.stringify() if the supplied parameter is an object.
The text was updated successfully, but these errors were encountered:
I think
json()
does not return a the correct Response type when passed a string.This works:
as it correctly returns
{"hello": "world"}
with a valid JSON content type header.But this:
returns
hello world
(without quotations) and atext/plain
content type header. If you try to parse that JSON it will fail. It should return"hello world"
, with quotations, which will parse correctly.I think this is because
createResponseType(...)
only callsJSON.stringify()
if the supplied parameter is an object.The text was updated successfully, but these errors were encountered: