Merge pull request #2323 from vsemozhetbyt/patch-6

Expand a note in 5.8 (XMLHttpRequest)
This commit is contained in:
Ilya Kantor 2020-11-29 11:15:36 +03:00 committed by GitHub
commit 277374fb00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -151,7 +151,7 @@ We can use `xhr.responseType` property to set the response format:
- `"text"` -- get as string,
- `"arraybuffer"` -- get as `ArrayBuffer` (for binary data, see chapter <info:arraybuffer-binary-arrays>),
- `"blob"` -- get as `Blob` (for binary data, see chapter <info:blob>),
- `"document"` -- get as XML document (can use XPath and other XML methods),
- `"document"` -- get as XML document (can use XPath and other XML methods) or HTML document (based on the MIME type of the received data),
- `"json"` -- get as JSON (parsed automatically).
For example, let's get the response as JSON: