def get.reply
import ezx@1.11.0.0/src/hub/get.bend as Getimport Base
import emerging-ezhttp@0.14.0.0/src/client.bend as Client
import ezx@1.11.0.0/src/hub/hub.bend as Hub
14# what ezhttp answered. It folds a socket that would not open and a reply that
15# came apart into one Err, so both are 6.
16def get.reply(response: Client.Response) -> String:
17 match response:
18 case Client.Err{why}:
19 "6\n" ++ why
20 case Client.Response{+status, _headers, body}:
21 Hub.get.status(U32.is_eq(status, 200), status, body)