# `WardrikHTTP.BodyReader`

Keeps a request's raw body while `Plug.Parsers` reads it, so webhook signatures can be checked
over the exact bytes.

Use it if your app parses bodies before `WardrikHTTP` sees them:

    plug Plug.Parsers,
      parsers: [:json],
      json_decoder: JSON,
      body_reader: {WardrikHTTP.BodyReader, :read_body, []}

# `kept`

```elixir
@spec kept(Plug.Conn.t()) :: binary() | nil
```

Returns the kept raw body, or `nil` if none was kept.

# `read_body`

```elixir
@spec read_body(Plug.Conn.t(), keyword()) ::
  {:ok, binary(), Plug.Conn.t()}
  | {:more, binary(), Plug.Conn.t()}
  | {:error, term()}
```

Reads the body as `Plug.Conn.read_body/2` does, and keeps a copy.

---

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