package cohttp-lwt-unix

  1. Overview
  2. Docs
include module type of struct include Cohttp.Response end
type t = Http.Response.t = {
  1. encoding : Cohttp__.Transfer.encoding;
    (*
    • deprecated this field will be removed in the future
    *)
  2. headers : Cohttp__.Header.t;
  3. version : Cohttp__.Code.version;
  4. status : Cohttp__.Code.status_code;
  5. flush : bool;
    (*
    • deprecated this field will be removed in the future
    *)
}
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
val encoding : t -> Cohttp__.Transfer.encoding
val headers : t -> Cohttp__.Header.t
val version : t -> Cohttp__.Code.version
val status : t -> Cohttp__.Code.status_code
val flush : t -> bool
val compare : t -> t -> int
val make : ?version:Cohttp__.Code.version -> ?status:Cohttp__.Code.status_code -> ?flush:bool -> ?encoding:Cohttp__.Transfer.encoding -> ?headers:Cohttp__.Header.t -> unit -> t
val has_body : t -> [ `No | `Unknown | `Yes ]
val pp_hum : Stdlib.Format.formatter -> t -> unit
module Make : sig ... end
module Private : sig ... end
include sig ... end
type reader = Cohttp__Response.Private.Make(Cohttp_lwt_unix__.Io).reader
type writer = Cohttp__Response.Private.Make(Cohttp_lwt_unix__.Io).writer
module IO : sig ... end
val read : IO.ic -> [ `Eof | `Invalid of string | `Ok of t ] IO.t
val make_body_writer : ?flush:bool -> t -> IO.oc -> writer
val make_body_reader : t -> IO.ic -> reader
val read_body_chunk : reader -> Cohttp__.Transfer.chunk IO.t
val write_header : t -> IO.oc -> unit IO.t
val write_body : writer -> string -> unit IO.t
val write : ?flush:bool -> (writer -> unit IO.t) -> t -> IO.oc -> unit IO.t
OCaml

Innovation. Community. Security.