module Url:sig..end
Dom_html.window##location object.val urldecode : string -> stringurldecode s swaps percent encoding characters for their usual
representation.val urlencode : ?with_plus:bool -> string -> stringurlencode ?with_plus s replace characters for their percent encoding
representation. Note that the '/' (slash) character is escaped as well. If
with_plus is true (default) then '+''s are escaped as "%2B". If not,
'+''s are left as is.type http_url = {
|
hu_host : |
(* |
The host part of the url.
| *) |
|
hu_port : |
(* |
The port for the connection if any.
| *) |
|
hu_path : |
(* |
The path splitted on
'/' characters. | *) |
|
hu_path_string : |
(* |
The original entire path.
| *) |
|
hu_arguments : |
(* |
Arguments as a field-value
association list.
| *) |
|
hu_fragment : |
(* |
The fragment part (after the
'#' character). | *) |
type file_url = {
|
fu_path : |
|
fu_path_string : |
|
fu_arguments : |
|
fu_fragment : |
type url =
| |
Http of |
(* |
Non secure HTTP urls
| *) |
| |
Https of |
(* |
Secure HTTPS urls
| *) |
| |
File of |
(* |
Local files
| *) |
val default_http_port : intHttp communications (80).val default_https_port : intHttps communications (443).val path_of_path_string : string -> string listpath_of_path_string s splits s on each "/" character.val encode_arguments : (string * string) list -> stringencode_arguments a expects a list of pair of values of the form
(name,value) were name is the name of an argument and value it's
associated value.val decode_arguments : string -> (string * string) listdecode_arguments s parses s returning the sliced-diced
association list.val url_of_string : string -> url optionurl_of_string s parses s and builds a value of type url if s is not
a valid url string, it returns None.val string_of_url : url -> stringstring_of_url u returns a valid string representation of u. Note that
* string_of_url ((fun Some u -> u) (url_of_string s)) is NOT necessarily
* equal to s. However url_of_string (string_of_url u) = u.module Current:sig..end