Akagi201
12/6/2014 - 1:49 PM

curl.md

静态库

  • curl-config --static-libs

curl to python

curl to go

post请求

  • curl -i -d "grant_type=client_credentials&client_id=8EEdQ1cwlXKwc9sg5owY2qma&client_secret=ac9db65885f25bbf4d327f36c9a26a65&" "https://openapi.baidu.com/oauth/2.0/token"

get请求

  • curl -G -d "tex='你好'&lan=zh&cuid='12345678'&ctp=1&tok='24.e8f9c802abb8ab6a6f7cff91eef340f3.2592000.1445583379.282335-6738735'" "http://tsn.baidu.com/text2audio"

homebrew

path

  • LDFLAGS: -L/usr/local/opt/curl/lib
  • CPPFLAGS: -I/usr/local/opt/curl/include

lua

显示支持的协议列表

  • curl-config --protocols
  • curl --version