Dust.Requests.Proxy (Dust v0.0.2-dev) View Source

Proxy configuration struct. Proxy address can start with http/s or socks5. It is also possible to only specify address field and when you call Proxy.get_config/1 then we try to parse URI to figure out type, auth details in this case default values will be also applied.

# 2 fields with default values
%Proxy{
  address: "socks5://user:pass@awesome.host:port"
  username: "user",
  password: "pass"
}

Link to this section Summary

Types

t()

Proxy

Functions

Prepare proxy configuration for HTTPoison

Link to this section Types

Specs

t() :: %Dust.Requests.Proxy{
  address: String.t() | nil,
  password: String.t() | nil,
  username: String.t() | nil
}

Proxy

Link to this section Functions

Specs

get_config(t()) :: Keyword.t()

Prepare proxy configuration for HTTPoison