2

I try to update the data of json file and use the command curl -i -H "Content-Type : Application/json" -X POST http://127.0.0.1:5000/courses but I got an error something like - Invoke-WebRequest : Missing an argument for parameter 'InFile'. Specify a parameter of type 'System.String' and try again. At line:1 char:6

  • curl -i -H "Content-Type : Application/json" -X POST http://127.0.0.1 ...
  •  ~~
    
    • CategoryInfo : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
    • FullyQualifiedErrorId : MissingArgument,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Please correct me where I'm wrong.

Annu
  • 21
  • 1

1 Answers1

1

curl is not actually the normal UNIX curl in PowerShell. It's an alias for Invoke-WebRequest.

If you're using Windows 10, you can type cmd.exe before you run the curl command. That will put you in the Windows Command Prompt, where, if you're on Windows 10, you can run the real curl utility.

You might need to see the notes here, since you're on Windows.

Also see this.