Windows 10 – CURL Protocol "’https" not supported or disabled in libcurl Error

Lately I had to use the CURL command line tool to debug a Web Service Endpoint connection.

But every time I ran this I got this Error message ?

Note: Unnecessary use of -X or –request, GET is already inferred.
* Protocol “‘https” not supported or disabled in libcurl
* Closing connection -1
curl: (1) Protocol “‘https” not supported or disabled in libcurl

image

Actually this Error is putting you on the wrong leg !

It’s nothing to do with unsupported protocol but rather with wrong command line formatting.

In the windows version of CURL, you need to enclose the command with double quotes, instead of single quotes.

This will not work !

curl -v -u your.name@mysite.com:password -X GET 'https://webservices.com/api/?query="priority:3"'


SOLUTION :

So you need to start and end with double quotes !

But this will give an other issue where the query string needs double quotes as well ? Sad smile

This is how it should look :

curl -v -u your.name@mysite.com:password -X GET "https://webservices.com/api/?query=%22priority:3%22"

Where you replace the double quotes in the Query string with the URL encode version being %22 Smile

Enjoy!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: