package shuttle_http

  1. Overview
  2. Docs
type t

t Represents a HTTP 1.1 response.

val sexp_of_t : t -> Sexplib0.Sexp.t
val create : ?version:Version.t -> ?reason_phrase:string -> ?headers:Headers.t -> ?body:Body.t -> Status.t -> t
val version : t -> Version.t

version returns the HTTP version number for the response.

val status : t -> Status.t

status returns the Status code for this response.

val reason_phrase : t -> string

reason_phrase returns the status reason phrase for the response.

val headers : t -> Headers.t

headers returns the HTTP headers for this response.

val body : t -> Body.t

body returns the body payload of this response.

val with_headers : t -> Headers.t -> t
OCaml

Innovation. Community. Security.