-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Consider a request to a server that successfully returns XML data (aka anything that is not JSON).
In the node version we have this flow:
- construct
out
as the concatenated data stream string - since the header
content-type
does not includeapplication/json
so... - the response
data
property is set to theout
(aka the response body realized) - the promise is resolved with that response (aka
response.data
is the response body XML string)
However, in the fetch version we have this flow:
- the header
content-type
does not includeapplication/json
so... - try to parse the string from
fetch.text()
as JSON - since the response is XML this throws
- set the error on the response
- the promise is rejected but the
fetch.text()
string is not available on the response
Metadata
Metadata
Assignees
Labels
No labels