package ohttp-cohttp-lwt
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=6a31dba01d9ee06d1b0115516439d8b0
sha512=c2739c32cf8d44b36ca565052f6b14feaf99a029115e8d94dcd469bd363f7dacd8e401a4ca07c0a3555f0fe5572a37516b489ddd945ee9acae4ceafc29e7dadb
doc/ohttp-cohttp-lwt/Ohttp_cohttp_lwt/Gateway/index.html
Module Ohttp_cohttp_lwt.GatewaySource
A gateway: its key configurations, and the resource to which relays send Encapsulated Requests.
val handler :
?path:string ->
?now:(unit -> float) ->
Ohttp.Service.Gateway.t ->
forward ->
handlerServes key_configs at Ohttp.Http_binding.well_known_gateway_path, requests at path, "/gateway" by default, and a 404 elsewhere.
Answers with the key configurations, whatever the request.
Answers an Encapsulated Request with an Encapsulated Response, through Ohttp.Service.Gateway.receive. now is the clock of the replay check, Unix.gettimeofday by default.
A request longer than the max_request_size of service is answered with Ohttp.Service.content_too_large, and one that arrives while max_in_flight are being answered with Ohttp.Service.busy, both in the clear.
An exception raised by forward is answered with a sealed 500: once the encapsulation is removed, every answer goes back sealed.