getData();
function getData (){
fetch(`http://myUrl`,{
method: 'GET'
}).then(response => {
console.log('type ',response.headers.get('Content-Type'));
console.log('staus ',response.status);
return response.json
})
.then(json => console.log('json', json))
.catch(error => {
console.log('err => ',error)
})
}