package ohttp-cohttp

  1. Overview
  2. Docs
Oblivious HTTP (RFC 9458) for the types of the http package

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1.2.tar.gz
md5=6a31dba01d9ee06d1b0115516439d8b0
sha512=c2739c32cf8d44b36ca565052f6b14feaf99a029115e8d94dcd469bd363f7dacd8e401a4ca07c0a3555f0fe5572a37516b489ddd945ee9acae4ceafc29e7dadb

doc/ohttp-cohttp/Ohttp_cohttp/index.html

Module Ohttp_cohttpSource

Between 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.

Fields

Sourceval fields : Http.Header.t -> (string * string) list

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.

Sourceval header : (string * string) list -> Http.Header.t

Messages

Sourceval request_to_bhttp : scheme:string -> Http.Request.t -> string -> Bhttp.Request.t

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.

Sourceval request_of_bhttp : Bhttp.Request.t -> Http.Request.t

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.

Sourceval request_headers : Bhttp.Request.t -> Http.Header.t

The fields of request_of_bhttp.

Sourceval response_to_bhttp : Http.Response.t -> string -> Bhttp.Response.t

response_to_bhttp response content is a response that a client received, as a Binary HTTP response.

Resources

Sourceval path : Http.Request.t -> string

The path of the request's target, without its query.

Sourceval 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.

Sourceval target : targets:(string * Uri.t) list -> Bhttp.Request.t -> (Uri.t, Bhttp.Response.t) result

Ohttp.Service.Gateway.target, with URIs: where a gateway sends a request that it has decapsulated, or the response to give instead.