Hairpin.open.as: def of bend-kit-hairpin@0.13.0.1 Import: import bend-kit-hairpin@0.13.0.1/hairpin.bend as Hairpin Lines 469-477 of bend-kit-hairpin@0.13.0.1/hairpin.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-hairpin@0.13.0.1/hairpin.bend&start_line=469&end_line=477 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 # A streamed request under the same budget, deadline, backoff, and breaker as request.as. The stream opens on # the client's pool. It follows the client's redirect mode, presents its certificate, and sends and stores # cookies through its jar, as request.as does. judge reads the status and headers through Http.stream.res. # A refused stream closes before the next attempt; the last one comes back open, so the caller can read its # body. Close it with stream.close to give its connection back to the pool. def open.as(~judge: Result<&1, &1, Http.Err, Http.Stream> -> Result<&1, &1, Http.Err, Http.Stream> & Verdict, c: Client, b: Retry.Budget, +idem: Bool, +enc: String, +method: String, url: String, headers: Map<&2, List<&2, String>>, body: Bytes.Bytes) -> IO(Client & Retry.Budget & Result<&1, &1, Err, Http.Stream>): run(~Http.Stream, ~judge, ~try.stream, ~Http.stream.close, c, b, idem, enc, method, url, headers, body) Uses (17): 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=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=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=Verdict https://jend.leeeet.dev/definition.txt?path=bend-kit-hairpin@0.13.0.1/hairpin.bend&name=run https://jend.leeeet.dev/definition.txt?path=bend-kit-hairpin@0.13.0.1/hairpin.bend&name=try.stream https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Err https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Stream https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=stream.close https://jend.leeeet.dev/definition.txt?path=bend-kit-retry@0.3.0.0/retry.bend&name=Budget