curl -H “Content-Type:application/json” -X POST -d ‘{“text”:”你好”,”nbest”:”5″}’ http://xxx.baidu.com
curl -x http://proxy.example.com:8080 http://example.com curl --proxy socks5://proxy.example.com:1080 http://example.com curl -x http://user:password@proxy.example.com:8080 http://example.com
# 环境变量配置proxy http_proxy=http://proxy.xxx.com:3128/ \ https_proxy=http://proxy.xxx.com:3128/ \ HTTP_PROXY=http://proxy.xxx.com:3128/ \ HTTPS_PROXY=http://proxy.xxx.com:3128/ \ no_proxy=.cluster.local,.baidu.com,*.cc.com,custom-domain \ NO_PROXY=.cluster.local,.baidu.com,*.cc.com,custom-domain # 命令行curl跳过proxy curl --noproxy "*" https://www.baidu.com curl --noproxy ".baidu.com" https://www.baidu.com # 显示请求耗时 curl --noproxy "*.baidu.com" -o /dev/null -s -w "%{time_total}\n" "https://www.baidu.com"