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
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 email@example.com:password -X GET 'https://webservices.com/api/?query="priority:3"'
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 ?
This is how it should look :
curl -v -u firstname.lastname@example.org: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