Bill
Bill

Reputation: 19308

Possible to get HTTP response headers with nodejs and puppeteer?

enter image description here

Hi there,

is there any possible way to get the server information like the above by using nodejs and puppeteer?

many thanks

Upvotes: 11

Views: 16373

Answers (1)

Thomas Dondorf
Thomas Dondorf

Reputation: 25280

These are the response headers, which you can get with response.headers():

const response = await page.goto(url);
const headers = response.headers();
console.log(headers);

Upvotes: 33

Related Questions