在Powershell中的curl --data-binary
中Invoke-WebRequest
映射到什么?
Curl "http://mysiteURL" -u user:pass --data-binary "input=1&type=3"
我试过了:
Invoke-webRequest -Uri "http://mysiteURL" -Credentials $MyCreds -Body "input=1&type=3"
最佳答案
因为Microsoft的人们认为Powershell应该进行这种“劫持”。您可以通过将curl作为“curl.exe”来调用来避免这种情况。
另请参阅Removing the PowerShell curl alias