How to use curl with
proxy:
- Method 1:
- Use export to set the env variable:
- export http_proxy=http://your.proxy.server:port/
- export https_proxy=https://your.proxy.server:port/
- Now curl should take the proxy from env variable
- Method 2:
- Use command line option
- -x, --proxy <[protocol://][user:password@]proxyhost[:port]>
- "-x, --proxy" means that either one can be used
- Example: curl -x http://proxy_server:proxy_port --proxy-user username:password -L http://url
~Sujith Emmanuel
No comments:
Post a Comment