def body.of

bend-kit-llm@0.13.0.1 · llm.bend:296

import bend-kit-llm@0.13.0.1/llm.bend as Llm
import Base
import bend-kit-hairpin@0.13.0.1/hairpin.bend as Hairpin
import bend-kit-http@0.38.1.1/http.bend as Http
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

296# The 2xx body, or why there is none.
297def body.of(r: Result<&1, &1, Hairpin.Err, Http.Res>) -> Result<&1, &1, Err, Bytes.Bytes>:
298  match r:
299    case Fail{e}:
300      Fail{ErrNet{e}}
301    case Done{res}:
302      Http.Res{+status, h, b} = res
303      body.ok(ok(status), status, b)

Uses (7)

Used by (1)