View Source OneAndDone.Response (One and Done v0.1.5)
A basic module for capturing the essence of a response.
Also captures a hash of the request that generated the response. This is used to determine if two requests sharing the same idempotency key are the same to prevent accidental misuse of the idempotency key.
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()}], request_hash: non_neg_integer(), status: non_neg_integer() }