I
Size: a a a
I
AM
AM
AN
QH
I
AN
I
AN
I
AN
I
response.json
(), а третий откуда?AN
function handleErrors(response) {
if (!response.ok) {
throw Error(response.statusText);
}
return response;
}
fetch(url, {mode: "no-cors"})
.then(handleErrors)
.then(response => response.json())
.then(json => callback(json))
.catch(error => console.log(error));
I
AD
function handleErrors(response) {
if (!response.ok) {
throw Error(response.statusText);
}
return response;
}
fetch(url, {mode: "no-cors"})
.then(handleErrors)
.then(response => response.json())
.then(json => callback(json))
.catch(error => console.log(error));
.then(response => response.json())
.then(json => callback(json))
AN
.then(response => response.json())
.then(json => callback(json))
AN
AD
response.json(): Promise
?AN
response.json(): Promise
?AN