Answer the question
In order to leave comments, you need to log in
How to get Request Headers?
How to get Request Headers via javascript in the console
, I want to get them in the console
Answer the question
In order to leave comments, you need to log in
In theory:
fetch('url', {
method: "GET",
}).then(function(response) {
console.log(response.status);
console.log(response.statusText);
console.log(response.headers); //=> Headers
console.log(response.url);
}, function(error) {
console.log(error.message);
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question