Camber.server.handle: def of bend-kit-camber@0.15.0.1 Import: import bend-kit-camber@0.15.0.1/camber.bend as Camber Lines 1101-1115 of bend-kit-camber@0.15.0.1/camber.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-camber@0.15.0.1/camber.bend&start_line=1101&end_line=1115 import Base import bend-kit-http@0.38.1.1/http.bend as Http import bend-kit-http@0.38.1.1/completion.bend as TransportCompletion import bend-kit-time@0.3.0.0/time.bend as Time def server.handle(~A: Data, ~S: Type, ~K: Data, ~H: Data, ~done: TransportCompletion.Completion> -> IO(Unit), context: ServingContext, req: Http.Req ) -> IO(Http.Reply): ServingContext{+app, owner} = context Application{table, config, root, groups} = app Http.Req{method, target, headers, body} = req do IO: started : Time.Duration <- Time.mono() +body_channel : Chan(Http.Body) <- Chan.new(Http.Body, 1) +response_channel : Chan(Http.Res) <- Chan.new(Http.Res, 1) sent : Result<&1, &1, Http.Body, Unit> <- Chan.send(Http.Body, body_channel, body) outcome : Outcome> <- call(S, Application>, BufferedRequest, Unit, ApplicationReport, owner, app, BufferedRequest{Metadata{method, target, headers}, body_channel, response_channel}) server.response(~K, ~H, ~done, config, started, outcome, body_channel, response_channel) Uses (24): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Chan https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Chan.new https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Chan.send https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=Application https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=ApplicationReport https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=BufferedRequest https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=Metadata https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=NoticePayload https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=Outcome https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=Policy https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=ServingContext https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=call https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=server.response https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/completion.bend&name=Completion https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Body https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Reply https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Req https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Res https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=Duration https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=mono