Skip to content

Commit

Permalink
Merge pull request #28 from AdrianSkar/AdrianSkar-patch-1
Browse files Browse the repository at this point in the history
refactor[response]: variable declarations + log descriptions
  • Loading branch information
Schalk Neethling committed Jul 29, 2022
2 parents 100113c + fbca2d5 commit a4fcc3e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions fetch-response/index.html
Expand Up @@ -21,13 +21,13 @@ <h1>Fetch basic response example</h1>

fetch(myRequest)
.then((response) => {
console.log(response.type);
console.log(response.url);
console.log(response.useFinalURL);
console.log(response.status);
console.log(response.ok);
console.log(response.statusText);
console.log(response.headers);
console.log('response.type =', response.type);
console.log('response.url =', response.url);
console.log('response.userFinalURL =', response.useFinalURL);
console.log('response.status =', response.status);
console.log('response.ok =', response.ok);
console.log('response.statusText =', response.statusText);
console.log('response.headers =', response.headers);
if (!response.ok) {
throw new Error(`HTTP error, status = ${response.status}`);
}
Expand Down

0 comments on commit a4fcc3e

Please sign in to comment.