Source file response.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
type t =
  { version : Httpaf.Version.t
  ; status : Httpaf.Status.t
  ; reason : string option
  ; headers : Httpaf.Headers.t
  ; body : Body.t
  ; env : Context.t
  }

let make
    ?(version = { Httpaf.Version.major = 1; minor = 1 })
    ?(status = `OK)
    ?reason
    ?(headers = Httpaf.Headers.empty)
    ?(body = Body.empty)
    ?(env = Context.empty)
    ()
  =
  { version; status; reason; headers; body; env }
;;