def http.handle
ezmcp@0.1.0.0 · src/io.bend:207
import ezmcp@0.1.0.0/src/io.bend as Io
import Base
import emerging-ezjson@1.2.0.0/src/value.bend as Value
import emerging-ezhttp@0.21.0.0/src/http.bend as Http
import ezmcp@0.1.0.0/src/rpc.bend as Rpc
import ezmcp@0.1.0.0/src/server.bend as Server
207
208def http.handle(
209 ~run: String -> Value.Json -> IO(Rpc.Out),
210 ~srv: Server.Server,
211 ~path: String,
212 ~origins: List<&2, String>,
213 req: Http.Request
214) -> IO(Http.Reply):
215 http.handle_with(~Unit, ~(_c => n => a => run(n, a)), srv, path, origins,
216 Unit{}, req)