We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Related to #163
In nativeSend, the request.responseBody sometimes it's undefined, when the responseType is empty.
nativeSend
request.responseBody
undefined
responseType
Refer to https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType
We need to have a fallback to either responseText or response based on the responseType. Something like
responseText
response
const response = new _Response.Response(request.status, request.responseBody || request.responseText || request.response, headers);
Also, in _handleResponse we are stringifying the response without checking the responseType We should do something like:
_handleResponse
if (this.responseType === "blob") { if (body instanceof Blob) { this._response = body; } else { this._response = new Blob([body]); } } else if (this.responseType === "json") { this._response = JSON.stringify(body); } else { this._response = body; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Related to #163
In
nativeSend
, therequest.responseBody
sometimes it'sundefined
, when theresponseType
is empty.Refer to https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType
We need to have a fallback to either
responseText
orresponse
based on the responseType.Something like
Also, in
_handleResponse
we are stringifying the response without checking theresponseType
We should do something like:
The text was updated successfully, but these errors were encountered: