curl command doesn't work properly in command prompt

Viewed 860

I'm trying to use a certain API at this site by curl. I'm trying the example snippet written in the page on Command Prompt, but cmd returns error below:

curl -H 'Authentication: Token myToken' \

curl: (6) Could not resolve host: Token
curl: (6) Could not resolve host: myToken'
curl: (6) Could not resolve host: \

-d 'html=<h1>HTML PDF API is cool!</h1>' \

The system cannot find the file specified.

'https://htmlpdfapi.com/api/v1/pdf' > result.pdf

''https:' is not recognized as an internal or external command,
operable program or batch file.


I searched for the usage of curl and Documentation of this API, but I couldn't solve. Being very new to using API, using curl, and HTTP, I don't even know how to divide my problem and how to search the solution.

Any information would be appreciated.

progression

I found that

  • Windows version of curl is a bit different from Unix version of curl which is shown in the examples at the API site.
  • I tried the same command on WSL Ubuntu, it worked.

I'm thinking that Windows is a bit uncomfortable and taking effort in doing engineering things, because many engineering tools out there are supposed to be used in Linux of Mac.

1 Answers

I found that

  • Windows version of curl seems a bit different from Unix version of curl which is shown in the examples at the API site.
  • I tried the same command on WSL Ubuntu, and it worked.

I'm thinking that Windows is a bit uncomfortable and taking effort in doing engineering things, because many engineering tools out there are supposed to be used in Linux or Mac.

It ended up taking a bit different way as I expected, I would like to close this question here for the present, as at least I can use this API now.

Any discussion about this question would still be welcomed.

Related