def stream.one
import bend-kit-http@0.38.4.0/http.bend as Httpimport Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
5080# One request, on an idle socket to its origin when the pool has one. The hop comes back for the redirect.
5081def stream.one(p: Pool, h: Hop, +ms: U32, cert: Maybe<&2, Cert>, +ca: String, jar: Maybe<&2, Jar>) -> IO(Pool & Hop & Result<&1, &1, Err, Stream>):
5082 Hop{+method, +url, +headers, body} = h
5083 stream.one.of(p, method, url, headers, jar.opt.apply(jar, url, headers), ms, Bytes.slice(body, 0, 4294967295), cert, ca)