sig
type etag = string
val compute_new_ri_cookies :
float ->
string list ->
string Ocsigen_lib.String.Table.t ->
Ocsigen_cookies.cookie Ocsigen_lib.String.Table.t
Ocsigen_cookies.Cookies.t -> string Ocsigen_lib.String.Table.t
module Result :
sig
type result
val cookies :
Ocsigen_http_frame.Result.result -> Ocsigen_cookies.cookieset
val lastmodified : Ocsigen_http_frame.Result.result -> float option
val etag : Ocsigen_http_frame.Result.result -> string option
val code : Ocsigen_http_frame.Result.result -> int
val stream :
Ocsigen_http_frame.Result.result ->
string Ocsigen_stream.t *
(string Ocsigen_stream.t -> int64 -> string Ocsigen_stream.step Lwt.t)
option
val content_length : Ocsigen_http_frame.Result.result -> int64 option
val content_type : Ocsigen_http_frame.Result.result -> string option
val headers : Ocsigen_http_frame.Result.result -> Http_headers.t
val charset : Ocsigen_http_frame.Result.result -> string option
val location : Ocsigen_http_frame.Result.result -> string option
val default : unit -> Ocsigen_http_frame.Result.result
val update :
Ocsigen_http_frame.Result.result ->
?cookies:Ocsigen_cookies.cookieset ->
?lastmodified:float option ->
?etag:string option ->
?code:int ->
?stream:string Ocsigen_stream.t *
(string Ocsigen_stream.t ->
int64 -> string Ocsigen_stream.step Lwt.t)
option ->
?content_length:int64 option ->
?content_type:string option ->
?headers:Http_headers.t ->
?charset:string option ->
?location:string option -> unit -> Ocsigen_http_frame.Result.result
val empty : unit -> Ocsigen_http_frame.Result.result
end
type result = Result.result
val cookies : result -> Ocsigen_cookies.cookieset
val lastmodified : result -> float option
val etag : result -> string option
val code : result -> int
val stream :
result ->
string Ocsigen_stream.t *
(string Ocsigen_stream.t -> int64 -> string Ocsigen_stream.step Lwt.t)
option
val content_length : result -> int64 option
val content_type : result -> string option
val headers : result -> Http_headers.t
val charset : result -> string option
val location : result -> string option
val default : unit -> result
val update :
result ->
?cookies:Ocsigen_cookies.cookieset ->
?lastmodified:float option ->
?etag:string option ->
?code:int ->
?stream:string Ocsigen_stream.t *
(string Ocsigen_stream.t ->
int64 -> string Ocsigen_stream.step Lwt.t)
option ->
?content_length:int64 option ->
?content_type:string option ->
?headers:Http_headers.t ->
?charset:string option -> ?location:string option -> unit -> result
val empty : unit -> result
module type HTTP_CONTENT =
sig
type t
type options
val result_of_content :
?options:Ocsigen_http_frame.HTTP_CONTENT.options ->
Ocsigen_http_frame.HTTP_CONTENT.t ->
Ocsigen_http_frame.Result.result Lwt.t
val get_etag :
?options:Ocsigen_http_frame.HTTP_CONTENT.options ->
Ocsigen_http_frame.HTTP_CONTENT.t -> Ocsigen_http_frame.etag option
end
module Http_header :
sig
type http_method =
GET
| POST
| HEAD
| PUT
| DELETE
| TRACE
| OPTIONS
| CONNECT
| LINK
| UNLINK
| PATCH
type http_mode =
Query of (Ocsigen_http_frame.Http_header.http_method * string)
| Answer of int
| Nofirstline
type proto = HTTP10 | HTTP11
type http_header = {
mode : Ocsigen_http_frame.Http_header.http_mode;
proto : Ocsigen_http_frame.Http_header.proto;
headers : Http_headers.t;
}
val get_firstline :
Ocsigen_http_frame.Http_header.http_header ->
Ocsigen_http_frame.Http_header.http_mode
val get_headers :
Ocsigen_http_frame.Http_header.http_header -> Http_headers.t
val get_headers_value :
Ocsigen_http_frame.Http_header.http_header ->
Http_headers.name -> string
val get_headers_values :
Ocsigen_http_frame.Http_header.http_header ->
Http_headers.name -> string list
val get_proto :
Ocsigen_http_frame.Http_header.http_header ->
Ocsigen_http_frame.Http_header.proto
val add_headers :
Ocsigen_http_frame.Http_header.http_header ->
Http_headers.name ->
string -> Ocsigen_http_frame.Http_header.http_header
end
module Http_error :
sig
exception Http_exception of int * string option * Http_headers.t option
val expl_of_code : int -> string
val display_http_exception : exn -> unit
val string_of_http_exception : exn -> string
end
type t = {
frame_header : Ocsigen_http_frame.Http_header.http_header;
frame_content : string Ocsigen_stream.t option;
frame_abort : unit -> unit Lwt.t;
}
end