Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Protocol Https not supported or disabled in curl

Tags:

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

like image 934
Clement Ong Avatar asked Apr 16 '26 02:04

Clement Ong


1 Answers

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.

like image 160
Tobias K. Avatar answered Apr 19 '26 17:04

Tobias K.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!