How to pass Proxy host, username and password in curl request


1 Answer

7 years ago by

Following is the way, how you pass proxy host, port, username and passowrd with curl

curl --proxy <proxy host>:<proxy port> --proxy-user <username>:<password> "<url to hit>"

Example:

curl --proxy www.proxy-provider.com:8080 --proxy-user username:password "https://example.com/foo"
7 years ago by Karthik Divi