Running CURL commands in Windows 7 and 10

Iā€™m using Postman to work with Taxify (made by Sovos) and their REST API.

I pull up the proper command, go to the ā€œCodeā€ section, and select cURL. I then copy the text there and use it to run the cURL command.

It works perfectly on the Mac but not on Windows. Iā€™ve tried installing cURL on Windows 7 and ran it using the natively installed cURL in Windows 10, but it fails every time on Windows.

Anyone have any suggestions or guidance? Iā€™m not sure why it doesnā€™t work.

Thanks,

Michael Frankel
Wizard Consulting Group

Can you share with us which error you are getting when running cURL?

Have you tried Cygwin? It works great for running Linux commands on Windows boxes, including curl.

Unfortunately, Iā€™m trying to run a command-line script in Windows from a 3rd party application, so using Cygwin will not help.

OK - 2 versions of this. The first one is using the exact cURL command, copied directly out of Postman, with the line endings (which appear to work only in Unix-based systems) removed:

curl -X POST https://ws.taxify.co/taxify/1.1/core/JSONService.asmx/GetCodes -H ā€˜Content-Type: application/jsonā€™ -H ā€˜cache-control: no-cacheā€™ -d ā€˜{GetCodes:{Security:{Password:ā€œMY_API_KEYā€},CodeType:ā€œitemā€}}ā€™

This is the response I got:

curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

So then I added the option to ignore security certificate errors:

curl --insecure -X POST https://ws.taxify.co/taxify/1.1/core/JSONService.asmx/GetCodes -H ā€˜Content-Type: application/jsonā€™ -H ā€˜cache-control: no-cacheā€™ -d ā€˜{GetCodes:{Security:{Password:ā€œMY_API_KEYā€},CodeType:ā€œitemā€}}ā€™

Then I got this response:

{ā€œMessageā€:ā€œThere was an error processing the request.ā€,ā€œStackTraceā€:"",ā€œExceptionTypeā€:""}

The odd thing is that the first version of this works perfectly on a Mac.

Any suggestions would be welcomed and appreciated.

Thanks,

Michael Frankel
Wizard Consulting Group

I would check the quotes.

Windows requires double quotes. Had same problem

Great - so you can cut and paste the cURL that runs almost everywhere (as is) but to get it to run in windows you have to edit the whole thing to use " and delimit them when they are in the body and swap the \ at the ends of lines for ^

Great Job MS - :frowning: