For an existing HTTPotion application, pass the endpoint to its ibrowse transport:

response = HTTPotion.get(
  "http://www.example.com/",
  ibrowse: [proxy_host: ~c"proxy.example", proxy_port: 8080]
)

The ~c literal supplies an Erlang charlist for the proxy hostname. The port is an integer. An HTTP endpoint from the HTTP proxy list can fill these two fields for the permitted public request shown, without adding a proxy account. HTTPotion's README calls out that ibrowse options generally use charlists rather than ordinary Elixir binary strings.

The outer URL remains the destination. The nested ibrowse keyword list is the transport-options handoff; it is not an HTTP header or a query parameter.

Handle HTTPotion's returned Response or ErrorResponse through the application's usual flow. The non-bang method can return an error object, while get! raises on a failed operation.

This is a maintenance reference for HTTPotion, whose maintainer marks it deprecated. HTTPoison is a different library with another transport interface; its proxy argument is not the same option merely because the names look similar.

Аффингæй хæстæг статьялтæ