def endpoint
bend-kit-camber@0.15.0.1 · camber.bend:836
import bend-kit-camber@0.15.0.1/camber.bend as Camber
import Base
import bend-kit-http@0.38.1.1/http.bend as Http
836def endpoint(~A: Data, ~S: Type, ~K: Data, ~E: Data, ~H: Data,
837 ~run: A -> S -> K -> Match<Policy<H>> -> Http.Req -> IO(S & Result<&2, &1, Error<E>, Http.Res>),
838 ~mapper: S -> K -> Error<E> -> IO(S & Result<&2, &1, Error<E>, Http.Res>),
839 action: A, state: S, +config: K, selected: Match<Policy<H>>, meta: Metadata, entered: List<&2, Policy<H>>, body: Http.Body
840) -> IO(Completion<S, H>):
841 Metadata{method, target, headers} = meta
842 do IO<Completion<S, H>>:
843 outcome : S & Result<&2, &1, Error<E>, Http.Res> <- run(action, state, config, selected, Http.Req{method, target, headers, body})
844 result(~S, ~K, ~E, ~H, ~mapper, config, entered, outcome)