curl命令详解
curl请求https需要添加参数-k
请求查看响应头信息可以用-I
[machangwei@localhost ~]$ curl -I https://es.b2b.10086.cn/
curl: (60) Peer's Certificate issuer is not recognized.
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
[machangwei@localhost ~]$ curl -I -k https://es.b2b.10086.cn/
HTTP/1.1 200 OK
Date: Sat, 20 Nov 2021 01:53:50 GMT
Server: Apache
Last-Modified: Mon, 11 Jun 2007 18:53:14 GMT
ETag: "2d-432a5e4a73a80"
Accept-Ranges: bytes
Content-Type: text/html
Content-Length: 45
Connection: Keep-alive
Via: 1.1 ID-0002262061156206 uproxy-17