Deep Insights Into JavaScript’s Fetch API | by Sabesan Sathananthan

0
78


Synchronous properties of the Response object

const response = await fetch(url);

Response.okay

Response.standing

Response.statusText

Response.url

Response.sort

Response.redirected

Decide whether or not the request is profitable

Response.headers property

Learn how to learn content material

response.textual content()

response.json()

response.formData()

response.blob()

response.arrayBuffer()

Response.clone()

let textual content =  await response.textual content();
let json = await response.json(); // Report an error

Response.physique attribute

https://www.bccfalna.com/ebooks/wp-content/uploads/ebooks/2018/12/HTTP-Hyper-Textual content-Switch-Protocol-for-Webpage-%E2percent80percent93-Request-and-Response-Core-JSP-in-Hindi.png