package h1

  1. Overview
  2. Docs
A high-performance, memory-efficient, and scalable web server for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

h1-1.0.0.tbz
sha256=b851d170d99f1e216674c00c2a24b92a2948c0cca57ff0282427f1965ac8bd13
sha512=dde55fc1e6c6615c6b2a8baca1273528b305dd9f15e6bcb4a283b5f0e7909c7be549dd1ce802eceab2404eeb81def9f9350fe31b8a76ae65a004008dd6865e71

doc/h1/H1/Request/index.html

Module H1.RequestSource

Request

A client-initiated HTTP message.

Sourcetype t = {
  1. meth : Method.t;
  2. target : string;
  3. version : Version.t;
  4. headers : Headers.t;
}
Sourceval create : ?version:Version.t -> ?headers:Headers.t -> Method.t -> string -> t
Sourcemodule Body_length : sig ... end
Sourceval body_length : t -> Body_length.t

body_length t is the length of the message body accompanying t. It is an error to generate a request with a close-delimited message body.

See RFC7230§3.3.3 for more details.

Sourceval persistent_connection : ?proxy:bool -> t -> bool

persistent_connection ?proxy t indicates whether the connection for t can be reused for multiple requests and responses. If the calling code is acting as a proxy, it should pass ~proxy:true.

See RFC7230§6.3 for more details.

Sourceval pp_hum : Format.formatter -> t -> unit
Sourceval is_upgrade : t -> bool

is_upgrade t returns true if the request has the "Connection: upgrade" header.

OCaml

Innovation. Community. Security.