Question:
What does curl --data-binary
map to in Invoke-WebRequest
in powershell ?
1 2 |
Curl "http://mysiteURL" -u user:pass --data-binary "input=1&type=3" |
I tried:
1 2 |
Invoke-webRequest -Uri "http://mysiteURL" -Credentials $MyCreds -Body "input=1&type=3" |
Answer:
Because the people at Microsoft decided that powershell should do this sort of “hijacking”. You can avoid it by invoking curl as “curl.exe”.
See also Removing the PowerShell curl alias