Bandit.Adapter behaviour (Bandit v0.3.3) View Source
Defines behaviour to be implemented by HTTP Adapters in addition
to those defined by Plug.Conn.Adapter.
Link to this section Summary
Types
The requested URI exactly as it appears in the request line at the beginning of an HTTP request, NOT broken up into path & query components.
Callbacks
Returns the local connection info (port, IP and SSL certificate) for a connection.
Returns the initial connection data (method, request URI and headers) for a client connection.
Link to this section Types
Specs
request_uri() :: String.t()
The requested URI exactly as it appears in the request line at the beginning of an HTTP request, NOT broken up into path & query components.
Link to this section Callbacks
Specs
get_local_data(Plug.Conn.Adapter.payload()) :: Plug.Conn.Adapter.peer_data()
Returns the local connection info (port, IP and SSL certificate) for a connection.
Specs
read_headers(Plug.Conn.Adapter.payload()) :: {:ok, Plug.Conn.headers(), Plug.Conn.method(), request_uri(), Plug.Conn.Adapter.payload()} | {:error, String.t()}
Returns the initial connection data (method, request URI and headers) for a client connection.