def pool.idle.h1.bodies

bend-kit-http@0.38.2.0 · http.bend:3754

import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

3754# Copy only the reused HTTP/1.1 request body, for a stale-socket retry.
3755def pool.idle.h1.bodies(p: Pool, +key: String, +tls: Bool, +ms: U32, +idem: Bool,
3756    s: Socket, +method: String, +target: String, +authority: String,
3757    +headers: Map<&2, List<&2, String>>, r: Bytes.Bytes & Bytes.Bytes,
3758    route: Route) -> IO(Pool & Result<&1, &1, Err, Res>):
3759  (wire, spare) = r
3760  do IO<Pool & Result<&1, &1, Err, Res>>:
3761    o : Out <- conn.ex.h1(tls, s, ms, Send{method, target, authority, headers, wire})
3762    pool.reused(p, key, tls, ms, idem,
3763      Send{method, target, authority, headers, spare}, o, route)

Uses (20)

Used by (1)