curl是一个特别方便的用于http(s)客户端。
curl -v http://www.baidu.com
curl -v http://www.baidu.com
* Rebuilt URL to: http://www.baidu.com/
* Trying 103.235.46.39...
* TCP_NODELAY set
* Connected to www.baidu.com (103.235.46.39) port 80 (#0)
> GET / HTTP/1.1
> Host: www.baidu.com
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: bfe/1.0.8.18
...
curl -k --cacert $ca_file --key $key_file --cert $cert_file https://XXXX