def get.status

ezx@1.11.0.0 · src/hub/hub.bend:11

import ezx@1.11.0.0/src/hub/hub.bend as Hub
import Base

11# a status other than 200 is a miss with the number in it, never a body
12def get.status(ok: Bool, status: U32, body: String) -> String:
13  match ok:
14    case True{}:
15      "0\n" ++ body
16    case False{}:
17      "22\nthe server answered " ++ U32.show(status)

Uses (5)

Used by (1)