PaperTiger.WebhookDelivery.Response (PaperTiger v1.1.1)

Copy Markdown View Source

The successful result of a PaperTiger.WebhookDelivery.Adapter.deliver/1 call.

Returned inside {:ok, %Response{}} to signal the webhook was either delivered or durably accepted by the adapter. PaperTiger treats any {:ok, %Response{}} as terminal success and does not retry.

  • :status — for the built-in HTTP adapter, the 2xx status code from the endpoint. A host adapter that durably enqueues should use a synthetic 202 to mean "accepted, will deliver".
  • :body — response body if any (the built-in adapter records this on the event's delivery attempt). Empty string is fine.

Summary

Types

t()

@type t() :: %PaperTiger.WebhookDelivery.Response{
  body: String.t(),
  status: non_neg_integer()
}