curl 支持 http2
安装
brew install curl-openssl
写入环境变量
echo ‘export PATH="/usr/local/opt/curl-openssl/bin:$PATH"’ >> ~/.bash_profile
source ~/.bash_profile
For compilers to find curl-openssl you may need to set
export LDFLAGS="-L/usr/local/opt/curl-openssl/lib"
export CPPFLAGS="-I/usr/local/opt/curl-openssl/include"
参考:
https://stackoverflow.com/questions/31708574/curl-does-not-support-http2-on-mac