How to escape special characters in password for using eventing REST API

example →

curl -v -GET http://Username:p@$$word@10.10.10.10:8096/api/v1/status/sample_function

getting below error →
curl: (3) URL using bad/illegal format or missing URL

@jon.strabala , need your help

i have used like below - it worked.

curl -X GET -u ‘Username:p@$$word’ ‘http://’

2 Likes

Glad it work sorry I just saw this.

Typically I like to set CB_USERNAME and CB_PASSWORD as environment variables. I don’tlike putting credentials in the URL.

Then I use:

curl -v -u ${CB_USERNAME}:${CB_PASSWORD}
-GET http://10.10.10.10:8096/api/v1/status/sample_function

thanks, @jon.strabala - did the same.

off the topic, is there a way we can call these URLs on HTTPS over HTTP?

1 Like

Yes http → https 8096 → 18096 and you may need a -k option

curl -k -v -u ${CB_USERNAME}:${CB_PASSWORD}
-GET https://10.10.10.10:18096/api/v1/status/sample_function

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.