For an application already using ibrowse, the forward proxy belongs in the request options:

Options = [{proxy_host, "proxy.example"},
           {proxy_port, 8080}],
ibrowse:send_req("http://www.example.com/", [], get, [],
                 Options, 5000).

This example assumes the ibrowse application is already started. The sixth argument supplies the request timeout in milliseconds. The request URL identifies the destination; proxy_host and proxy_port identify the intermediary. Replace the placeholder with an unauthenticated candidate from the HTTP proxy list when testing this public HTTP URL.

The documented authentication options are proxy_user and proxy_password. Add them when the proxy requires that account, rather than using the destination's own login as an interchangeable credential.

A synchronous result can be {ok, Status, Headers, Body} or an error tuple. Inspect Status as well as the tuple tag. An HTTP redirect or a proxy's error response can arrive successfully at the transport level without being the page the application expected.

This snippet follows the documented HTTP-proxy option interface. It does not configure Erlang's other HTTP clients or establish support for every proxy authentication scheme. Keep the route and result handling beside the request so the calling code can explain which endpoint it tried and which response it received.

Winndannde jowitiiɗe heen