# `HttpDouble.Request`
[🔗](https://github.com/aszymanskiit/http_double/blob/main/lib/http_double/request.ex#L1)

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.

# `method`

```elixir
@type method() :: String.t()
```

Canonical method name as an uppercase string (e.g. "GET").

# `query`

```elixir
@type query() :: %{optional(String.t()) =&gt; String.t()}
```

Decoded query string key/value map.

# `t`

```elixir
@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.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
