I am trying to exercute the code from https://github.com/lhartikk/naivecoin/tree/chapter5 When I run 'curl -X POST http://localhost:3001/mineBlock' on powershell, it shows:
PS C:\\Users\\zhanzp\\Documents\\Comp5211\\naivecoin-COMP5521-master\\naivecoin-COMP5521-master\> curl -X POST http://localhost:3001/mineBlock
Invoke-WebRequest : A parameter cannot be found that matches parameter name 'X'.
At line:1 char:6
+ curl -X POST http://localhost:3001/mineBlock
+
~~
+ CategoryInfo : InvalidArgument: (:) \[Invoke-WebRequest\], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Problem. The version of my curl is: curl 7.79.1 (Windows) libcurl/7.79.1 Schannel. How to fix this problem? Thanks!
The command should work fine.