Looking for javascript Answers? Try Ask4KnowledgeBase
Looking for javascript Keywords? Try Ask4Keywords

JavaScript GlobalFetch


The GlobalFetch interface exposes the fetch function, which can be used to request resources.

    .then(response => {
        if (!response.ok()) {
            throw new Error("Request failed!");
        return response.json();
    .then(json => { 

The resolved value is a Response Object. This Object contains the body of the response, as well as it's status and headers.