def took.ok

ezmcp@0.1.0.0 · src/client.bend:58

import ezmcp@0.1.0.0/src/client.bend as Client
import Base
import ezmcp@0.1.0.0/src/rpc.bend as Rpc

58def took.ok(+ctype: String, text: String, ok: Bool, +status: U32) -> Rpc.Reply:
59  match ok:
60    case True{}:
61      Rpc.read(body(is.sse(ctype), text))
62    case False{}:
63      Rpc.Unread{"HTTP " ++ U32.show(status) ++ ": " ++ text}

Uses (9)

Used by (1)