Webhooks.send.signed: def of bend-kit-webhooks@0.11.0.1 Import: import bend-kit-webhooks@0.11.0.1/webhooks.bend as Webhooks Lines 456-469 of bend-kit-webhooks@0.11.0.1/webhooks.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&start_line=456&end_line=469 import Base 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 # Receivers deduplicate on the event ID, so the POST is safe to repeat. def send.signed(c: Hairpin.Client, b: Retry.Budget, +url: String, r: Bytes.Bytes & Result<&1, &1, Err, Map<&2, List<&2, String>>>) -> IO(Hairpin.Client & Retry.Budget & Result<&1, &1, SendErr, Http.Res>): (body, signed) = r match signed: case Fail{e}: IO.pure(Hairpin.Client & Retry.Budget & Result<&1, &1, SendErr, Http.Res>, (c, b, Fail{SendSign{e}})) case Done{+h}: do IO>: enc : String <- Http.codings() x : Hairpin.Client & Retry.Budget & Result<&1, &1, Hairpin.Err, Http.Res> <- Hairpin.request.as(~send.judge, Hairpin.redirect(c, Http.ModeManual{}), b, True{}, enc, "POST", url, Http.set(h, "content-type", "application/json"), body) return send.result(x) Uses (24): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Map https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-hairpin@0.13.0.1/hairpin.bend&name=Client https://jend.leeeet.dev/definition.txt?path=bend-kit-hairpin@0.13.0.1/hairpin.bend&name=Err https://jend.leeeet.dev/definition.txt?path=bend-kit-hairpin@0.13.0.1/hairpin.bend&name=redirect https://jend.leeeet.dev/definition.txt?path=bend-kit-hairpin@0.13.0.1/hairpin.bend&name=request.as https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Mode https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Res https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=codings https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=set https://jend.leeeet.dev/definition.txt?path=bend-kit-retry@0.3.0.0/retry.bend&name=Budget https://jend.leeeet.dev/definition.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&name=Err https://jend.leeeet.dev/definition.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&name=SendErr https://jend.leeeet.dev/definition.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&name=send.judge https://jend.leeeet.dev/definition.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&name=send.result