Treatment connection



⬡ http_server: http/server::HttpServer


↳ const method: HttpMethod (http/method::HttpMethod)
↳ const route: string

Required contexts

⥱ @HttpRequest: http/server::@HttpRequest


⇥ data: Stream<byte>
⇥ headers: Block<Map> (std/data::Map)
⇥ status: Block<HttpStatus> (http/status::HttpStatus)


↦ data: Stream<byte>
↦ failure: Block<string>
↦ headers: Block<Map> (std/data::Map)
↦ started: Block<void>

Connection on HTTP server.

For every valid incoming HTTP request to http_server, a new track with all the outputs is created.

In order to start sending response to the requester, status and headers inputs must be filled. status can be any valid HTTP code, for more informations please see the MDN Documentation.

Outputs: - headers: headers send in request. - data: the raw body data received in the request. - failure: emitted if a failure occurs during the processing of request.

Inputs: - status: HTTP status response. - headers: headers to send in response. - data: data to send in response, corresponding to the HTTP body.