MailglassInbound.Ingress.CachingBodyReader (MailglassInbound v0.1.0)

Copy Markdown View Source

Package-local Plug.Parsers body reader for inbound provider verification.

Stores exact request bytes in conn.private[:raw_body] so the inbound plug can verify provider authenticity before any tenant or persistence work runs.

Summary

Functions

read_body(conn, opts)

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