`sig
type protocol_version = int * int
type protocol_attribute = [ `Secure_https ]
type protocol =
[ `Http of Nethttp.protocol_version * Nethttp.protocol_attribute list
| `Other ]
val string_of_protocol : Nethttp.protocol -> string
val protocol_of_string : string -> Nethttp.protocol
type http_status =
[ `Accepted
| `Bad_gateway
| `Bad_request
| `Conflict
| `Continue
| `Created
| `Expectation_failed
| `Forbidden
| `Found
| `Gateway_timeout
| `Gone
| `Http_version_not_supported
| `Internal_server_error
| `Length_required
| `Method_not_allowed
| `Moved_permanently
| `Multiple_choices
| `No_content
| `Non_authoritative
| `Not_acceptable
| `Not_found
| `Not_implemented
| `Not_modified
| `Ok
| `Partial_content
| `Payment_required
| `Precondition_failed
| `Proxy_auth_required
| `Request_entity_too_large
| `Request_timeout
| `Request_uri_too_long
| `Requested_range_not_satisfiable
| `Reset_content
| `See_other
| `Service_unavailable
| `Switching_protocols
| `Temporary_redirect
| `Unauthorized
| `Unsupported_media_type
| `Use_proxy ]
val int_of_http_status : Nethttp.http_status -> int
val http_status_of_int : int -> Nethttp.http_status
val string_of_http_status : Nethttp.http_status -> string
val base_code : int -> int
type http_method = string * string
type cache_control_token =
[ `Extension of string * string option
| `Max_age of int
| `Max_stale of int option
| `Min_fresh of int
| `Must_revalidate
| `No_cache of string list
| `No_store
| `No_transform
| `Only_if_cached
| `Private of string list
| `Proxy_revalidate
| `Public
| `S_maxage of int ]
type etag = [ `Strong of string | `Weak of string ]
val weak_validator_match : Nethttp.etag -> Nethttp.etag -> bool
val strong_validator_match : Nethttp.etag -> Nethttp.etag -> bool
exception Bad_header_field of string
class type http_header = Netmime.mime_header
class type http_header_ro = Netmime.mime_header_ro
class type http_trailer = Netmime.mime_header
class type http_trailer_ro = Netmime.mime_header_ro
val status_of_cgi_header : Nethttp.http_header -> int * string
type netscape_cookie = {
cookie_name : string;
cookie_value : string;
cookie_expires : float option;
cookie_domain : string option;
cookie_path : string option;
cookie_secure : bool;
}
type cookie = Nethttp.netscape_cookie
val decode_query : string -> string * string
val split_host_port : string -> string * int option
val uripath_encode : string -> string
val uripath_decode : string -> string
module Cookie :
sig
type t
val make :
?max_age:int ->
?domain:string ->
?path:string ->
?secure:bool ->
?comment:string ->
?comment_url:string ->
?ports:int list -> string -> string -> Nethttp.Cookie.t
val name : Nethttp.Cookie.t -> string
val value : Nethttp.Cookie.t -> string
val domain : Nethttp.Cookie.t -> string option
val path : Nethttp.Cookie.t -> string option
val ports : Nethttp.Cookie.t -> int list option
val max_age : Nethttp.Cookie.t -> int option
val secure : Nethttp.Cookie.t -> bool
val comment : Nethttp.Cookie.t -> string
val comment_url : Nethttp.Cookie.t -> string
val set_value : Nethttp.Cookie.t -> string -> unit
val set_max_age : Nethttp.Cookie.t -> int option -> unit
val set_domain : Nethttp.Cookie.t -> string option -> unit
val set_path : Nethttp.Cookie.t -> string option -> unit
val set_secure : Nethttp.Cookie.t -> bool -> unit
val set_comment : Nethttp.Cookie.t -> string -> unit
val set_comment_url : Nethttp.Cookie.t -> string -> unit
val set_ports : Nethttp.Cookie.t -> int list option -> unit
val of_netscape_cookie : Nethttp.netscape_cookie -> Nethttp.Cookie.t
val to_netscape_cookie : Nethttp.Cookie.t -> Nethttp.netscape_cookie
end
module Header :
sig
val get_accept :
#Nethttp.http_header_ro ->
(string * (string * string) list * (string * string) list) list
val best_media_type :
#Nethttp.http_header_ro ->
string list -> string * (string * string) list
val set_accept :
#Nethttp.http_header ->
(string * (string * string) list * (string * string) list) list ->
unit
val get_accept_charset :
#Nethttp.http_header_ro -> (string * (string * string) list) list
val best_charset : #Nethttp.http_header_ro -> string list -> string
val set_accept_charset :
#Nethttp.http_header ->
(string * (string * string) list) list -> unit
val get_accept_encoding :
#Nethttp.http_header_ro -> (string * (string * string) list) list
val best_encoding : #Nethttp.http_header_ro -> string list -> string
val set_accept_encoding :
#Nethttp.http_header ->
(string * (string * string) list) list -> unit
val get_accept_language :
#Nethttp.http_header_ro -> (string * (string * string) list) list
val set_accept_language :
#Nethttp.http_header ->
(string * (string * string) list) list -> unit
val get_accept_ranges : #Nethttp.http_header_ro -> string list
val set_accept_ranges : #Nethttp.http_header -> string list -> unit
val get_age : #Nethttp.http_header_ro -> float
val set_age : #Nethttp.http_header -> float -> unit
val get_allow : #Nethttp.http_header_ro -> string list
val set_allow : #Nethttp.http_header -> string list -> unit
val get_authorization :
#Nethttp.http_header_ro -> string * (string * string) list
val set_authorization :
#Nethttp.http_header -> string * (string * string) list -> unit
val get_cache_control :
#Nethttp.http_header_ro -> Nethttp.cache_control_token list
val set_cache_control :
#Nethttp.http_header -> Nethttp.cache_control_token list -> unit
val get_connection : #Nethttp.http_header_ro -> string list
val set_connection : #Nethttp.http_header -> string list -> unit
val get_content_encoding : #Nethttp.http_header_ro -> string list
val set_content_encoding : #Nethttp.http_header -> string list -> unit
val get_content_language : #Nethttp.http_header_ro -> string list
val set_content_language : #Nethttp.http_header -> string list -> unit
val get_content_length : #Nethttp.http_header_ro -> int64
val set_content_length : #Nethttp.http_header -> int64 -> unit
val get_content_location : #Nethttp.http_header_ro -> string
val set_content_location : #Nethttp.http_header -> string -> unit
val get_content_md5 : #Nethttp.http_header_ro -> string
val set_content_md5 : #Nethttp.http_header -> string -> unit
val get_content_range :
#Nethttp.http_header_ro ->
[ `Bytes of (int64 * int64) option * int64 option ]
val set_content_range :
#Nethttp.http_header ->
[ `Bytes of (int64 * int64) option * int64 option ] -> unit
val get_content_type :
#Nethttp.http_header_ro -> string * (string * string) list
val set_content_type :
#Nethttp.http_header -> string * (string * string) list -> unit
val get_date : #Nethttp.http_header_ro -> float
val set_date : #Nethttp.http_header -> float -> unit
val get_etag : #Nethttp.http_header_ro -> Nethttp.etag
val set_etag : #Nethttp.http_header -> Nethttp.etag -> unit
val get_expect :
#Nethttp.http_header_ro ->
(string * string option * (string * string) list) list
val set_expect :
#Nethttp.http_header ->
(string * string option * (string * string) list) list -> unit
val get_expires : #Nethttp.http_header_ro -> float
val set_expires : #Nethttp.http_header -> float -> unit
val get_from : #Nethttp.http_header_ro -> string
val set_from : #Nethttp.http_header -> string -> unit
val get_host : #Nethttp.http_header_ro -> string * int option
val set_host : #Nethttp.http_header -> string * int option -> unit
val get_if_match : #Nethttp.http_header_ro -> Nethttp.etag list option
val set_if_match :
#Nethttp.http_header -> Nethttp.etag list option -> unit
val get_if_modified_since : #Nethttp.http_header_ro -> float
val set_if_modified_since : #Nethttp.http_header -> float -> unit
val get_if_none_match :
#Nethttp.http_header_ro -> Nethttp.etag list option
val set_if_none_match :
#Nethttp.http_header -> Nethttp.etag list option -> unit
val get_if_range :
#Nethttp.http_header_ro -> [ `Date of float | `Etag of Nethttp.etag ]
val set_if_range :
#Nethttp.http_header ->
[ `Date of float | `Etag of Nethttp.etag ] -> unit
val get_if_unmodified_since : #Nethttp.http_header_ro -> float
val set_if_unmodified_since : #Nethttp.http_header -> float -> unit
val get_last_modified : #Nethttp.http_header_ro -> float
val set_last_modified : #Nethttp.http_header -> float -> unit
val get_location : #Nethttp.http_header_ro -> string
val set_location : #Nethttp.http_header -> string -> unit
val get_max_forwards : #Nethttp.http_header_ro -> int
val set_max_forwards : #Nethttp.http_header -> int -> unit
val get_pragma :
#Nethttp.http_header_ro -> (string * string option) list
val set_pragma :
#Nethttp.http_header -> (string * string option) list -> unit
val get_proxy_authenticate :
#Nethttp.http_header_ro -> (string * (string * string) list) list
val set_proxy_authenticate :
#Nethttp.http_header ->
(string * (string * string) list) list -> unit
val get_proxy_authorization :
#Nethttp.http_header_ro -> string * (string * string) list
val set_proxy_authorization :
#Nethttp.http_header -> string * (string * string) list -> unit
val get_range :
#Nethttp.http_header_ro ->
[ `Bytes of (int64 option * int64 option) list ]
val set_range :
#Nethttp.http_header ->
[ `Bytes of (int64 option * int64 option) list ] -> unit
val get_referer : #Nethttp.http_header_ro -> string
val get_referrer : #Nethttp.http_header_ro -> string
val set_referer : #Nethttp.http_header -> string -> unit
val set_referrer : #Nethttp.http_header -> string -> unit
val get_retry_after :
#Nethttp.http_header_ro -> [ `Date of float | `Seconds of int ]
val set_retry_after :
#Nethttp.http_header -> [ `Date of float | `Seconds of int ] -> unit
val get_server : #Nethttp.http_header_ro -> string
val set_server : #Nethttp.http_header -> string -> unit
val get_te :
#Nethttp.http_header_ro ->
(string * (string * string) list * (string * string) list) list
val set_te :
#Nethttp.http_header ->
(string * (string * string) list * (string * string) list) list ->
unit
val get_trailer : #Nethttp.http_header_ro -> string list
val set_trailer : #Nethttp.http_header -> string list -> unit
val get_transfer_encoding :
#Nethttp.http_header_ro -> (string * (string * string) list) list
val set_transfer_encoding :
#Nethttp.http_header ->
(string * (string * string) list) list -> unit
val get_upgrade : #Nethttp.http_header_ro -> string list
val set_upgrade : #Nethttp.http_header -> string list -> unit
val get_user_agent : #Nethttp.http_header_ro -> string
val set_user_agent : #Nethttp.http_header -> string -> unit
val get_vary :
#Nethttp.http_header_ro -> [ `Fields of string list | `Star ]
val set_vary :
#Nethttp.http_header -> [ `Fields of string list | `Star ] -> unit
val get_www_authenticate :
#Nethttp.http_header_ro -> (string * (string * string) list) list
val set_www_authenticate :
#Nethttp.http_header ->
(string * (string * string) list) list -> unit
val get_cookie : #Nethttp.http_header_ro -> (string * string) list
val get_cookie_ct : #Nethttp.http_header_ro -> Nethttp.Cookie.t list
val set_cookie : #Nethttp.http_header -> (string * string) list -> unit
val get_set_cookie :
#Nethttp.http_header_ro -> Nethttp.netscape_cookie list
val set_set_cookie :
#Nethttp.http_header -> Nethttp.netscape_cookie list -> unit
val set_set_cookie_ct :
#Nethttp.http_header -> Nethttp.Cookie.t list -> unit
end
val rev_split : (char -> bool) -> string -> string list
end`