Web.act: def of ezmcp@0.1.0.0 Import: import ezmcp@0.1.0.0/src/web.bend as Web Lines 29-43 of ezmcp@0.1.0.0/src/web.bend: https://jend.leeeet.dev/read.txt?path=ezmcp@0.1.0.0/src/web.bend&start_line=29&end_line=43 import Base import ezmcp@0.1.0.0/src/server.bend as Server # a server's act, under revision `rev`, as an HTTP reply: a request's reply # is 200 with its JSON, a notification or a response is 202 with no body, a # message the server cannot accept is 400 with its error def act(rev: String, lead: Server.Act) -> Web: match lead: case Server.Quiet{}: Now{202, [], ""} case Server.Send{reply}: json.reply(200, reply) case Server.Fault{reply}: json.reply(400, reply) case Server.Run{id, name, args}: Later{rev, id, name, args} case Server.Batch{acts}: Many{rev, acts} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/server.bend&name=Act https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/web.bend&name=Web https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/web.bend&name=json.reply