package bhttp

  1. Overview
  2. Docs
Binary Representation of HTTP Messages (RFC 9292) for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

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

doc/bhttp/Bhttp/Framing/index.html

Module Bhttp.FramingSource

Framing indicator (RFC 9292 Section 3.3).

Sourcetype t =
  1. | Known_length
    (*

    Every section carries a length prefix (RFC 9292 Section 3.1).

    *)
  2. | Indeterminate_length
    (*

    Sections end with a zero terminator, and content is sent as chunks, so a message can be produced before its size is known (RFC 9292 Section 3.2).

    *)

How the lengths of field sections and content are delimited.

Sourcetype kind =
  1. | Request
  2. | Response
Sourceval indicator : kind -> t -> int

The framing indicator, from 0 to 3, that starts a message.

Sourceval of_indicator : int -> (kind * t) option
Sourceval peek : string -> (kind * t, Error.t) result

peek message reads only the framing indicator of message.

Sourceval kind_to_string : kind -> string
Sourceval pp : Format.formatter -> t -> unit