def send.in

bend-kit-webhooks@0.11.0.1 · webhooks.bend:479

import bend-kit-webhooks@0.11.0.1/webhooks.bend as Webhooks
import Base
import bend-kit-time@0.3.0.0/time.bend as Time
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import bend-kit-hairpin@0.13.0.1/hairpin.bend as Hairpin
import bend-kit-retry@0.2.0.0/retry.bend as Retry
import bend-kit-http@0.38.1.1/http.bend as Http

479# One event and one signature per delivery, inside a caller's retry layer. Every attempt takes from b and
480# reuses this event ID, timestamp, headers, and raw body; the client's retry setting caps this delivery.
481# The budget left comes back: pass it to the next delivery of the same operation.
482def send.in(c: Hairpin.Client, b: Retry.Budget, url: String, id: String, secret: String, body: Bytes.Bytes) ->
483    IO(Hairpin.Client & Retry.Budget & Result<&1, &1, SendErr, Http.Res>):
484  do IO<Hairpin.Client & Retry.Budget & Result<&1, &1, SendErr, Http.Res>>:
485    now : Time.Instant <- Time.now()
486    send.at(c, b, url, id, secret, body, now)

Uses (13)

Used by (1)