package dream-httpaf

  1. Overview
  2. Docs
Internal: shared http/af stack for Dream (server) and Hyper (client)

Install

Dune Dependency

Authors

Maintainers

Sources

dream-1.0.0-alpha3.tar.gz
sha256=f289253109aee39ab912f9f38aa5e7b44e0b4b01fd7d3dd5c407b034c57f01bc
md5=148588e6f584cd9f2438e56da7df2f56

doc/dream-httpaf.h2/H2/Response/index.html

Module H2.ResponseSource

Response

A server-generated message to a Request.t.

Sourcetype t = {
  1. status : Status.t;
  2. headers : Headers.t;
}
Sourceval create : ?headers:Headers.t -> Status.t -> t

create ?headers status creates an HTTP response with the given parameters. Unlike the Response type in http/af, h2 does not define a way for responses to carry reason phrases or protocol version.

See RFC7540§8.1.2.4 for more details.

Sourceval body_length : t -> [ `Error of [ `Bad_request ] | `Fixed of int64 | `Unknown ]

body_length t is the length of the message body accompanying t.

See RFC7230§3.3.3 for more details.

Sourceval pp_hum : Format.formatter -> t -> unit
OCaml

Innovation. Community. Security.