Ymi
Ymi

Reputation: 768

curl: Quotation character in password for basic authorization

I am trying to call an API with basic authorization using curl, and am facing a problem where the password contains special characters, specifically quotation mark ("). How can I send a request with such parameters?

Example: username: myusername
password: pass"12<o

curl -k -u myusername:pass"12<o https://www.myurl.com/endpoint

Upvotes: 0

Views: 459

Answers (1)

Gilles Qu&#233;not
Gilles Qu&#233;not

Reputation: 185600

Try this:

curl -k -u 'myusername:pass"12<o' https://www.myurl.com/endpoint

Upvotes: 2

Related Questions