-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhttp_response.mli
35 lines (35 loc) · 1.36 KB
/
http_response.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
type response
val init :
?body:Http_message.contents list ->
?headers:(string * string) list ->
?version:Http_types.version ->
?status:Http_types.status_code ->
?reason:string ->
?clisockaddr:Unix.sockaddr ->
?srvsockaddr:Unix.sockaddr -> unit -> response
val version_string : response -> string
val code : response -> int
val set_code : response -> int -> unit
val status : response -> Http_types.status
val set_status : response -> Http_types.status -> unit
val reason : response -> string
val set_reason : response -> string -> unit
val status_line : response -> string
val is_informational : response -> bool
val is_success : response -> bool
val is_redirection : response -> bool
val is_client_error : response -> bool
val is_server_error : response -> bool
val is_error : response -> bool
val add_basic_headers : response -> unit
val content_type : response -> string option
val set_content_type : response -> value:string -> unit
val content_encoding : response -> string option
val set_content_encoding : response -> value:string -> unit
val date : response -> string option
val set_date : response -> value:string -> unit
val expires : response -> string option
val set_expires : response -> value:string -> unit
val server : response -> string option
val set_server : response -> value:string -> unit
val serialize : response -> Lwt_io.output_channel -> unit Lwt.t