def http.handle_from

ezmcp@0.1.0.0 · main.bend:223

import ezmcp@0.1.0.0/main.bend as Ezmcp
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
import ezmcp@0.1.0.0/src/io.bend as Io

223# one request to the MCP endpoint at `path`, its server and runner given
224# `ctx`
225def http.handle_from(
226  ~C: Data,
227  ~srv: C -> Server.Server,
228  ~run: C -> String -> Value.Json -> IO(Rpc.Out),
229  ~path: String,
230  ~origins: List<&2, String>,
231  +ctx: C,
232  req: Http.Request
233) -> IO(Http.Reply):
234  Io.http.web(C, run, ctx, Web.decide(srv(ctx), path, origins, req))

Uses (10)

Used by (0)

No other definition uses this definition.