package cohttp-eio

  1. Overview
  2. Docs

Module Cohttp_eio.BodySource

Sourcetype t =
  1. | Fixed of string
  2. | Chunked of chunk_writer
  3. | Custom of Eio.Buf_write.t -> unit
  4. | Empty
Sourceand chunk_writer = {
  1. body_writer : (chunk -> unit) -> unit;
  2. trailer_writer : (Http.Header.t -> unit) -> unit;
}
Sourceand chunk =
  1. | Chunk of chunk_body
  2. | Last_chunk of chunk_extension list

Chunk encapsulates HTTP/1.1 chunk transfer encoding data structures. https://datatracker.ietf.org/doc/html/rfc7230#section-4.1

Sourceand chunk_body = {
  1. size : int;
  2. data : string;
  3. extensions : chunk_extension list;
}
Sourceand chunk_extension = {
  1. name : string;
  2. value : string option;
}
Sourceval pp_chunk_extension : Format.formatter -> chunk_extension list -> unit
Sourceval pp_chunk : Format.formatter -> chunk -> unit
OCaml

Innovation. Community. Security.