Skip to content

When Curl isn't Curl

Curl in PowerShell and Curl elsewhere are not the same thing.


Working through the Getting Started guide for Event Store.


Running this in PowerShell 5.1:

curl -i -d "@event.json" "" -H "Content-Type:application/"

Gave me:

Invoke-WebRequest : Missing an argument for parameter 'InFile'. Specify a parameter of type 'System.String' and try again.

But why? Curl is set up properly (it's not telling me curl : The term 'curl' is not recognized . . .)


By default, curl in PowerShell does not use Curl (even if Curl is installed, added to your PATH and so on). Instead, curl is an alias of Invoke-WebRequest. This means that if you run curl in PowerShell with options that aren't supported by Invoke-WebRequest, you get the error above.


There are two options:

The StackOverflow answer linked above suggests removing curl as an alias:

Remove-item alias:curl

I decided I didn't want to mess with PowerShell's commands and aliases, so I used Git Bash to run my Curl commands instead.