Representation of a parsed HTTP/1.1 request.
This struct is used internally by the server, mock engine and matchers, and is exposed in typespecs so that callback functions in tests can inspect it.
Summary
Types
@type method() :: String.t()
Canonical method name as an uppercase string (e.g. "GET").
Decoded query string key/value map.
@type t() :: %HttpDouble.Request{ body: binary(), conn_id: non_neg_integer() | nil, headers: [{String.t(), String.t()}], host: String.t() | nil, http_version: String.t(), method: method(), path: String.t(), port: non_neg_integer() | nil, query: query(), raw_path: String.t(), request_index: non_neg_integer() }
Parsed HTTP request.
headers is a list of {name, value} tuples with lowercase header names.