def Http.eof

bend-kube-runtime@0.2.0.0 · src/http.bend:427

import bend-kube-runtime@0.2.0.0/src/http.bend as Http
import Base

427# The stream ended: a read-until-close body is then complete.
428def Http.eof(r: Resp) -> Resp:
429  match r:
430    case Resp{PClose{}, h, out}:
431      Resp{PDone{}, h, out}
432    case Resp{PDone{}, h, out}:
433      Resp{PDone{}, h, out}
434    case Resp{PErr{m}, h, out}:
435      Resp{PErr{m}, h, out}
436    case Resp{PLost{m}, h, out}:
437      Resp{PLost{m}, h, out}
438    case Resp{PHead{Nil{}, t}, h, out}:
439      Resp{PLost{"connection closed before a response"}, h, out}
440    case Resp{p, h, out}:
441      Resp{PErr{"connection closed mid-response"}, h, out}

Uses (3)

Used by (5)