def attempt.run
bend-kit-hairpin@0.14.0.0 · hairpin.bend:343
import bend-kit-hairpin@0.14.0.0/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.3.0.0/retry.bend as Retry
343def attempt.run(~R: Type, ~judge: Result<&1, &1, Http.Err, R> -> Result<&1, &1, Http.Err, R> & Verdict,
344 ~try: Opts -> Call -> Http.Pool -> Maybe<&2, Http.Jar> -> Bytes.Bytes -> IO(Http.Pool & Maybe<&2, Http.Jar> & Result<&1, &1, Http.Err, R>),
345 +o: Opts, +call: Call, +idem: Bool, +n: Nat, pool: Http.Pool, jar: Maybe<&2, Http.Jar>, br: Retry.Breaker,
346 b: Retry.Budget, r: Bytes.Bytes & Bytes.Bytes) -> IO(Step<R>):
347 Opts{base, h, ms, mode, +p, cert, ca} = o
348 (body, spare) = r
349 do IO<Step<R>>:
350 x : Http.Pool & Maybe<&2, Http.Jar> & Result<&1, &1, Http.Err, R> <- try(o, call, pool, jar, spare)
351 settle(~R, ~judge, p, idem, n, br, b, body, x)