Glossary Term
Response.json()
The json() method of the Response interface takes a Response stream and reads it to completion. It returns a promise which resolves with the result of parsing the body text as JSON.
Note that despite the method being named json(), the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.
Returns: A Promise that resolves to a JavaScript object. This object could be anything that can be represented by JSON — an object, an array, a string, a number…
Exceptions: AbortError DOMException The request was aborted. TypeError Thrown for one of the following reasons: The response body is disturbed or locked. There was an error decoding the body content (for example, because the Content-Encoding header is incorrect). SyntaxError The response body cannot be parsed as JSON.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
