The XMLHttpRequestResponseType type is an enumerated set of strings which are used to specify the type of data contained in the response of an XMLHttpRequest. These values are used when getting or setting the responseType on the request.
| Value | Description |
|---|---|
"" | An empty responseType string is treated the same as "text", the default type (therefore, as a DOMString. |
"arraybuffer" | The response is a JavaScript ArrayBuffer containing binary data. |
"blob" | The response is a Blob object containing the binary data. |
"document" | The response is an HTML Document or XML XMLDocument, as appropriate based on the MIME type of the received data. See HTML in XMLHttpRequest to learn more about using XHR to fetch HTML content. |
"json" | The response is a JavaScript object created by parsing the contents of received data as JSON. |
"text" | The response is text in a DOMString object. |
"moz-chunked-arraybuffer"
| Similar to Accessing |
"ms-stream"
| The response is part of a streaming download; this response type is only allowed for download requests, and is only supported by Internet Explorer. |
| Specification | Status | Comment |
|---|---|---|
| XMLHttpRequest | Unknown | Live standard, latest version |
No compatibility data found. Please contribute data for "api.XMLHttpRequestResponseType" (depth: 1) to the MDN compatibility data repository.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequestResponseType