可以使用 nodejs 和 puppeteer 获取 HTTP 响应标头吗? [英] Possible to get HTTP response headers with nodejs and puppeteer?

查看:97
本文介绍了可以使用 nodejs 和 puppeteer 获取 HTTP 响应标头吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

是否有任何可能的方法通过使用 nodejspuppeteer 来获取上述服务器信息?

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

非常感谢

推荐答案

这些是响应头,你可以通过 response.headers():

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

这篇关于可以使用 nodejs 和 puppeteer 获取 HTTP 响应标头吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆