View Source ReverseProxyPlug.HTTPClient.Request (reverse_proxy_plug v3.0.2)

Request properties:

  • :method - HTTP method as an atom (:get, :head, :post, :put, :delete, etc.)
  • :url - target url as a binary string or char list
  • :body - request body.
  • :headers - HTTP headers as an orddict (e.g., [{"Accept", "application/json"}])
  • :options - Keyword list of options. Valid options vary with the HTTP client used.
  • :query_params - Query parameters as a map, keyword, or orddict
  • :cookies - the original request's cookie string, in case an adapter needs to pass this in another form

The exact typing for each of the parameters depends on the adapter used.

Summary

Types

@type body() :: any()
@type cookies() :: bitstring()
@type headers() ::
  [{atom(), binary()}]
  | [{binary(), binary()}]
  | %{required(binary()) => binary()}
  | any()
@type method() :: :get | :post | :put | :patch | :delete | :options | :head
@type options() :: any()
@type query_params() :: any()
@type t() :: %ReverseProxyPlug.HTTPClient.Request{
  body: body(),
  cookies: cookies(),
  headers: headers(),
  method: method(),
  options: options(),
  query_params: query_params(),
  url: binary()
}
@type url() :: any()