【发布时间】:2018-05-09 19:54:34
【问题描述】:
我正在使用来自 Node 的superagent。
对于这样一个简单的请求,我怎样才能只获取/请求页面的标题,而不是完整的内容?
request.get('https://google.com')
.then((res) => {console.log(res.headers);})
.catch(err=> console.log(err.status));
我试图在文档和谷歌中找到,但找不到任何东西。
【问题讨论】:
-
@CBroe 是的,你是对的。这就是我需要的。我忽略了文档。
标签: http get http-headers superagent