= 768" x-on:close-sidebar="sidebar=window.innerWidth >= 768 && true">
On This Page
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Module to create HTTP responses.
type t = {
version : Httpaf.Version.t;
status : Httpaf.Status.t;
reason : string option;
headers : Httpaf.Headers.t;
body : Body.t;
env : Context.t;
}
Constructors
make
val make :
?version:Httpaf.Version.t ->
?status:Httpaf.Status.t ->
?reason:string ->
?headers:Httpaf.Headers.t ->
?body:Body.t ->
?env:Context.t ->
unit ->
t
make ?version ?status ?reason ?headers ?body ?env ()
creates a new response from the given values.
By default, the HTTP version will be set to 1.1, the HTTP status to 200 and the response will not contain any header or body.
On This Page