Site icon Roel Peters

cURL: Protocol “‘https” not supported or disabled in libcurl

In this blog post, I would like to tackle a recurring phenomenon that I always solved via trial-and-error, depending on the machine I was working on. I think it’s time to get a conclusive answer to the single/double quote problem that occurs with cURL in de Windows Command Prompt.

The issue usually manifests itself in the following way. You copy a cURL request command from a particular source. You expect it to work, but the error you receive hints that the https protocol is not supported.

However, if you look closely, you see a single quote between the double quotes in the error line. This is the character that results in the error. Consequently, if you replace every single quote in the request with a double quote, the call will succeed. What is going on here?

Single quotes in the command prompt

The Windows Command Prompt (CMD) cannot process single quotes, except for a particular situation: to loop over the results of a command.

FOR /F ["options"] %%parameter IN ('command to process') DO command

For this reason, you should never use single quotes in a command in CMD.

On a final note, you can use a unicode encoded single quote.

Say thanks, ask questions or give feedback

Technologies get updated, syntax changes and honestly… I make mistakes too. If something is incorrect, incomplete or doesn’t work, let me know in the comments below and help thousands of visitors.

Exit mobile version