let promise = fetch(url, [options])
let response = await fetch(url);

if (response.ok) { // if HTTP-status is 200-299
  // get the response body (see below)
  let json = await response.json();
} else {
  alert("HTTP-Error: " + response.status);
}
let response = await fetch('<https://api.github.com/repos/javascript-tutorial/en.javascript.info/commits>');

console.log(response.headers.get('Content-Type')); // application/json; charset=utf-8

for (let [key, value] of response.headers) {
  console.log(`${key} = ${value}`);
}
let response = fetch(protectedUrl, {
  headers: {
    Authentication: 'abcdef'
  }
});
let user = {
  name: 'John',
  surname: 'Smith'
};

let response = await fetch('/article/fetch-basics/post/user', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json;charset=utf-8'
  },
  body: JSON.stringify(user)
});

let result = await response.json();
alert(result.message);