View Source OneAndDone.Response (One and Done v0.1.0)

A basic module for capturing the essence of a response.

Response structs are stored in the cache so that idempotent requests can be quickly returned.

See OneAndDone.Response.Parser for turning an inbound connection (e.g. a Plug.Conn) into a OneAndDone.Response.

Link to this section Summary

Link to this section Types

@type t() :: %OneAndDone.Response{
  body: iodata(),
  cookies: %{optional(binary()) => map()},
  headers: [{binary(), binary()}],
  status: non_neg_integer()
}

Link to this section Functions

@spec build_response(any()) :: t()

See OneAndDone.Response.Parser.build_response/1.