Blog

Blog

PHODAL

Mac OS Curl HTTP/2 支持

尝试了几次用Curl来抓取HTTP2的内容

/usr/local/Cellar/curl/7.43.0/bin/curl --http2 http://www.phodal.com/
curl: (1) Unsupported protocol

发现一直提示:Unsupported protocol

后来发现少了nghttp2选项

Curl With HTTP2

于是添加with-nghttp2

 brew install curl --with-nghttp2

nghtt2是HTTP/2 C Library

接着,再次测试

 fdhuang  ⓔ test   master  ~/learing/lan  /usr/local/Cellar/curl/7.43.0/bin/curl -I -s  --http2 https://www.phodal.com/ -A google
HTTP/2.0 200
server:phodal/0.19.4
content-type:text/html; charset=utf-8
vary:Accept-Encoding
vary:Accept-Language, Cookie
content-language:en
x-ua-compatible:IE=Edge,chrome=1
date:Tue, 25 Aug 2015 05:51:01 GMT
x-page-speed:Powered By Phodal
cache-control:max-age=0, no-cache

看样子是支持了

关于我

Github: @phodal     微博:@phodal     知乎:@phodal    

微信公众号(Phodal)

围观我的Github Idea墙, 也许,你会遇到心仪的项目

QQ技术交流群: 321689806
comment

Feeds

RSS / Atom

最近文章

关于作者

Phodal Huang

Engineer, Consultant, Writer, Designer

ThoughtWorks 技术专家

工程师 / 咨询师 / 作家 / 设计学徒

开源深度爱好者

出版有《前端架构:从入门到微前端》、《自己动手设计物联网》、《全栈应用开发:精益实践》

联系我: h@phodal.com

微信公众号: 最新技术分享

标签