ReqProxy.Env (req_proxy v0.2.1)

Copy Markdown View Source

Calculate the appropriate proxy by following rules coming from environment variables according to libcurl conventions. See README for details.

Summary

Functions

Look up the proxy for a given destination.

Passing a get_env/1 function allows the environment to come from a different source than System.get_env/1.

Functions

find_proxy(url)

@spec find_proxy(URI.t()) :: binary() | nil

Look up the proxy for a given destination.

find_proxy(url, get_env)

@spec find_proxy(URI.t(), (binary() -> binary() | nil)) :: binary() | nil

Passing a get_env/1 function allows the environment to come from a different source than System.get_env/1.