When curl isn't curl
Scenario
Working through the Getting Started guide for Event Store.
Problem
Running this in PowerShell 5.1:
Gave me:
But why? Curl is set up properly (it's not telling me curl : The term 'curl' is not recognized . . .
)
Explanation
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.
Solution
There are two options:
The StackOverflow answer linked above suggests removing curl
as an alias:
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.