执行的请求
shell
# 使用https
curl --location 'https://ip:端口/api'
错误信息
shell
curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.
解决方法
shell
# 使用 -k
curl -k --location 'https://ip:端口/api'