有没有一种内置的方法可以通过node.js获取特定地址的报头?
像这样,
var headers = getUrlHeaders("http://stackoverflow.com");
将会返回
HTTP/1.1 200 OK.
Cache-Control: public, max-age=60.
Content-Type: text/html; charset=utf-8.
Content-Encoding: gzip.
Expires: Sat, 07 May 2011 17:32:38 GMT.
Last-Modified: Sat, 07 May 2011 17:31:38 GMT.
Vary: *.
Date: Sat, 07 May 2011 17:31:37 GMT.
Content-Length: 32516.
https://stackoverflow.com/questions/5922842
复制相似问题