Wednesday, December 19, 2018

How to configure a Proxy in a curl command HTP Request?

Imagine you need to invoke an endpoint which will always go through a proxy. As an example your company network might have configured through a network proxy. In that can, to invoke via CURL, You just need to do a simple thing.

You just have to add --proxy <Proxy_Host>:<Proxy_Port> at the end of your command.

E.g.,

curl -i -X GET https://<HOST>:<PORT>/test/login.jsp --proxy <Proxy_Host>:<Proxy_Port>

1 comment:

  1. Thanks for sharing valuable information on how to configure proxy in a curl command HTP Request. Network proxy is proxy server acts as a gateway between you and the internet.

    ReplyDelete