Response Object
noun
say it: “rih-SPONS OB-jekt” /rɪˈspɒns ˈɒbdʒɛkt/
The object fetch returns for a response, with its status, headers and methods to read the body.
What is Response Object in JavaScript?
Response Object — An object returned by fetch containing an HTTP response's status, headers, and body methods.
async function loadOrder() {
const response = await fetch("/api/order");
return response.json();
}
In a sentence
- “The Response object's ok was false, so I didn't read the JSON.”
Level: Journeyman · More JavaScript terms at this level
Updated