Page
Library
Module
Module type
Parameter
Class
Class type
Source
Ohttp_cohttpSourceBetween the messages of the http package and those of Bhttp.
cohttp 6 takes its types from the http package, and so do cohttp-lwt and cohttp-eio: this is what the adapters ohttp-cohttp-lwt and ohttp-cohttp-eio share, and what an adapter for another library over the same types can use.
The fields in order, with lowercase names, and without those that are specific to a connection (Bhttp.Field.without_connection_specific): they describe one hop, and mean nothing inside an encapsulated message.
request_to_bhttp ~scheme request content is a request that a server received, as a Binary HTTP request. HTTP/1.1 gives the authority in the host field, which moves into the control data.
The method, target, and fields of a Binary HTTP request, whose content is sent with it. The authority becomes the host field, unless the request has one.
The fields of request_of_bhttp.
response_to_bhttp response content is a response that a client received, as a Binary HTTP response.
The path of the request's target, without its query.
val gateway_resource :
?path:string ->
Http.Request.t ->
[ `Key_configs | `Requests | `Not_found ]Which resource of a gateway a request is for: a GET of Ohttp.Http_binding.well_known_gateway_path is for its key configurations, anything at path, "/gateway" by default, is for its Encapsulated Requests, and anything else is for neither.
val target :
targets:(string * Uri.t) list ->
Bhttp.Request.t ->
(Uri.t, Bhttp.Response.t) resultOhttp.Service.Gateway.target, with URIs: where a gateway sends a request that it has decapsulated, or the response to give instead.