Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Jerboa.Header
module consists of the type definition of header and also functions working on this type.
type t = Cohttp.Header.t
Header.t
the type definition of header.
Header.predefined_user_agent
is the user agent used by Jerboa by default.
val create : unit -> Cohttp.Header.t
Header.create
creates an empty header.
val create_with_list : (string * string) list -> Cohttp.Header.t
Header.create_with_list header_content
creates a header with the supplied header_content.
val remove : Cohttp.Header.t -> string -> Cohttp.Header.t
Header.remove header key
removes the value associated by the key.
val replace : Cohttp.Header.t -> string -> string -> Cohttp.Header.t
Header.replace header key value
replaces the value asscotiated by the key with the supplied value argument.
val add : Cohttp.Header.t -> string -> string -> Cohttp.Header.t
Header.add header key value
adds a new value associated by the key to the header.
val add_values : Cohttp.Header.t -> string -> string list -> Cohttp.Header.t
Header.add_values header key values
adds a list of values with the supplied key argument.
val add_list : Cohttp.Header.t -> (string * string) list -> Cohttp.Header.t
Header.add_list header header_content
adds header_content to the header.
val get : Cohttp.Header.t -> string -> string option
Header.get header key
gets the value associated by the key.
val get_values : Cohttp.Header.t -> string -> string list
Header.get_values header key
returns list of values associated by the key.
val has_key : Cohttp.Header.t -> string -> bool
Header.has_key header key
returns true only if the header has the key.
val is_empty : Cohttp.Header.t -> bool
Header.is_empty header
returns true if the header is empty.
val is_form : Cohttp.Header.t -> bool
Header.is_form header
returns true if the header is made by a form.
val get_cookies :
Cohttp.Header.t ->
(string * Cohttp.Cookie.Set_cookie_hdr.t) list
Header.get_cookies header
gets the cookies from the header.
val set_cookie :
?version:[ `HTTP_1_0 | `HTTP_1_1 ] ->
Cohttp.Header.t ->
Cohttp.Cookie.Set_cookie_hdr.t ->
Cohttp.Header.t
Header.set_cookie ?version header cookie
sets the cookie in the header with the optionaly supplied http version.
val to_string : Cohttp.Header.t -> string
Header.to_string header
returns a string representation of the header.
val to_list_string : Cohttp.Header.t -> string list
Header.to_list_string header
returns a list of string representation of the header. Lines do not end with /r/n character.