Possible to get HTTP response headers with nodejs and puppeteer?

こ雲淡風輕ζ 提交于 2019-12-08 13:42:03

问题


Hi there,

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

many thanks


回答1:


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);


来源:https://stackoverflow.com/questions/54935656/possible-to-get-http-response-headers-with-nodejs-and-puppeteer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!