【发布时间】:2015-03-23 14:44:50
【问题描述】:
如果我要发出没有--data "..." 的命令,它就可以正常工作。我试过谷歌,我找不到这个问题的任何答案。按照位于here 的指示,当我尝试使用 cURL 发布数据时出现以下错误:
PS C:\Users\David> curl --data "SMethod=0" "http://localhost/terra/modules/scripts/Query.php"
Invoke-WebRequest : A positional parameter cannot be found that accepts argument 'SMethod=0'.
At line:1 char:1
+ curl --data "SMethod=0" "http://localhost/terra/modules/scripts/Query.php"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
【问题讨论】: