Clement Ong
Clement Ong

Reputation: 107

Protocol Https not supported or disabled in curl

Am getting this error even though when i do

curl -V 

https is listed as one of the protocol.

Below is the curl command I input into shell:

curl -u {'username-key'} -H 'Content-Type:application/json' -X POST -d '{"dialog_node":"Animals"}' 'https://gateway.watsonplatform.net/assistant/api/v1/workspaces/{my workspace id}/dialog_nodes/LivingThings?version=2018-07-10'

This is a command to change the name of a dialog node inside IBM Watson. Attached the API for reference,

https://www.ibm.com/watson/developercloud/assistant/api/v1/curl.html?curl#update-dialog-node

Upvotes: 3

Views: 16160

Answers (2)

Sergio Mcfly PYK
Sergio Mcfly PYK

Reputation: 4331

Probably duplicated ?

Ref: "curl : (1) Protocol https not supported or disabled in libcurl"

Upvotes: 0

Tobias K.
Tobias K.

Reputation: 3092

I can actually reproduce this with your curl command:

curl: (1) Protocol "'https" not supported or disabled in libcurl

The ' before https made me suspicious so I tried without the quotes around the URL:

curl -u {'username-key'} -H 'Content-Type:application/json' -X POST -d '{"dialog_node":"Animals"}' https://gateway.watsonplatform.net/assistant/api/v1/workspaces/{my workspace id}/dialog_nodes/LivingThings?version=2018-07-10

And this works for me.

The double-quotes of the error message make this barely recognizable, it actually says:

Protocol 'https not supported

It interprets the escaping (single-)quotes as part of the URL/protocol.

On Windows cmd it is a known behaviour that quoting only works with double quotes.

Upvotes: 6

Related Questions