2

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

Clement Ong
  • 97
  • 1
  • 2
  • 10

2 Answers2

5

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.

Tobias K.
  • 2,997
  • 2
  • 12
  • 29
0

Probably duplicated ?

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

PYK
  • 3,674
  • 29
  • 17