def call.send

bend-kit-sigv4@0.11.0.1 · sigv4.bend:926

import bend-kit-sigv4@0.11.0.1/sigv4.bend as Sigv4
import Base
import bend-kit-hairpin@0.13.0.1/hairpin.bend as Hairpin
import bend-kit-http@0.38.1.1/http.bend as Http
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

926def call.send(s: Result<&1, &1, U32 & String, String & String>, cfg: Config, http: Hairpin.Client, +method: String, url: String,
927    extra: Map<&2, List<&2, String>>, date: String, token: String, body: Bytes.Bytes) -> IO(Client & Result<&1, &1, Err, Http.Res>):
928  match s:
929    case Fail{e}:
930      (code, why) = e
931      IO.pure(Client & Result<&1, &1, Err, Http.Res>, (Client{cfg, http}, Fail{ErrSign{code, why}}))
932    case Done{got}:
933      do IO<Client & Result<&1, &1, Err, Http.Res>>:
934        x : Hairpin.Client & Result<&1, &1, Hairpin.Err, Http.Res> <- send(http, method, url, request.signed(extra, date, token, got), body)
935        return call.done(cfg, x)

Uses (20)

Used by (1)