def run

bend-kit-hairpin@0.13.0.1 · hairpin.bend:446

import bend-kit-hairpin@0.13.0.1/hairpin.bend as Hairpin
import Base
import bend-kit-http@0.38.1.1/http.bend as Http
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import bend-kit-retry@0.2.0.0/retry.bend as Retry

446def run(~R: Type, ~judge: Result<&1, &1, Http.Err, R> -> Result<&1, &1, Http.Err, R> & Verdict,
447    ~try: Opts -> Call -> Http.Pool -> Maybe<&2, Http.Jar> -> Bytes.Bytes -> IO(Http.Pool & Maybe<&2, Http.Jar> & Result<&1, &1, Http.Err, R>),
448    ~close: R -> IO(Unit),
449    c: Client, b: Retry.Budget, +idem: Bool, enc: String, method: String, url: String,
450    headers: Map<&2, List<&2, String>>, body: Bytes.Bytes) -> IO(Client & Retry.Budget & Result<&1, &1, Err, R>):
451  Client{+o, pool, jar, br} = c
452  Opts{+base, +h, ms, mode, +p, cert, ca} = o
453  +call = {Call{enc, method, target.abs(target(base, url)), merge(h, headers)} : Call}
454  do IO<Client & Retry.Budget & Result<&1, &1, Err, R>>:
455    s : Step<R> <- go(~R, ~judge, ~try, ~close, attempts(p), 0n, o, call, idem, Step{pool, jar, br, b, body, None{}, Retry.PlanWait{0n}})
456    return request.done(R, o, s)

Uses (29)

Used by (2)