【发布时间】:2017-05-10 05:50:55
【问题描述】:
我一直在尝试从 windows powershell 卷曲,但没有运气。
curl -O -J -H @{'X-Api-Key' = 'abcdefghijk'} https://my.repo.com/abc/xyz
我收到以下错误
curl : The underlying connection was closed: An unexpected error occurred on a send.
At line:1 char:1
+ curl -O -J -H @{'X-Api-Key' = 'abcdefgh'} ht ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
【问题讨论】:
-
提及 curl 是 PowerShell cmdlet
Invoke-WebRequest的别名,而不是像许多其他人可能知道的那样 curl。
标签: windows powershell curl httprequest