在 powershell 中的 Invoke-WebRequest 中,curl --data-binary 映射到什么?

Cod*_*wer 5 powershell curl powershell-2.0

curl --data-binarypowershell中映射到什么Invoke-WebRequest

Curl "http://mysiteURL" -u user:pass --data-binary "input=1&type=3"
Run Code Online (Sandbox Code Playgroud)

我试过:

Invoke-webRequest -Uri "http://mysiteURL" -Credentials $MyCreds -Body "input=1&type=3"
Run Code Online (Sandbox Code Playgroud)

Dan*_*erg 1

因为微软的人认为 powershell 应该做这种“劫持”。您可以通过将curl 调用为“curl.exe”来避免这种情况。

另请参阅删除 PowerShell curl 别名