Skip to content

[Bug] The default value of XHR's response is incorrect #173

@condorheroblog

Description

@condorheroblog

In XHR's request, if I do not provide the response body - data, for example, in Node, using response. end() to end the request, the value of xhr.response will vary depending on the xhr.responseType. The actual comparison situation is shown in the table below.

xhr.responseType xhr.response
"" ""
text ""
json null
blob new Blob([], { type: "Content-Type" })(The value of Content-Type is returned by the server)
arraybuffer new ArrayBuffer()

But in xhook, the value of xhr. response is always an empty string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions