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.