【发布时间】:2020-07-11 13:36:10
【问题描述】:
我在 PowerShell 上运行这个 curl 命令。
curl.exe -0 -v --cert $cert --key $key --cacert $cacert GET $URIString
当一切正常时我能够得到输出,但我想得到它的“日志”,例如
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0* Could not resolve host: GET
* Closing connection 0
curl: (6) Could not resolve host: GET
* Trying XXX.XXX.XXX.XXX...
* TCP_NODELAY set
* Connected to xxxxxxxxxx (XXX.XXX.XXX.XXX) port 443 (#1)
* ALPN, offering http/1.1
* unable to set private key file: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' type PEM
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Closing connection 1
curl: (58) unable to set private key file: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX' type PEM
这是用于错误处理的。
【问题讨论】:
标签: powershell curl