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

Views: 667 Ask New Question


On By

1 Answer


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://fastfoodcoding.com/webapps/what-is-my-ip-address/api"
On By


Answer This Question