def http.handle_with

ezmcp@0.1.0.0 · src/io.bend:81

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
import ezmcp@0.1.0.0/src/web.bend as Web

81# one HTTP request to a server's endpoint at `path`
82def http.handle_with(
83  ~C: Data,
84  ~run: C -> String -> Value.Json -> IO(Rpc.Out),
85  ~srv: Server.Server,
86  ~path: String,
87  ~origins: List<&2, String>,
88  +ctx: C,
89  req: Http.Request
90) -> IO(Http.Reply):
91  http.web(C, run, ctx, Web.decide(srv, path, origins, req))

Uses (10)

Used by (3)