module Uri:sig..end
type t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
typecomponent =[ `Authority
| `Fragment
| `Host
| `Path
| `Query
| `Query_key
| `Query_value
| `Scheme
| `Userinfo ]
val component_of_sexp : Sexplib.Sexp.t -> component
val __component_of_sexp__ : Sexplib.Sexp.t -> component
val sexp_of_component : component -> Sexplib.Sexp.tval empty : tval compare : t -> t -> intval equal : t -> t -> boolequal a b is compare a b = 0.val pct_encode : ?scheme:string -> ?component:component -> string -> stringscheme argument defaults to 'http' and
the component argument defaults to `Pathval pct_decode : string -> stringval of_string : string -> tval to_string : t -> stringval resolve : string -> t -> t -> tval canonicalize : t -> tval make : ?scheme:string ->
?userinfo:string ->
?host:string ->
?port:int ->
?path:string ->
?query:(string * string list) list -> ?fragment:string -> unit -> t
The query string API attempts to accommodate conventional query
string representations (i.e. ?key0=value0&key1=value1) while
maximally exposing any meaning in those representations. For
example, it is not necessarily the case that / and /? are
equivalent to a web server. In the former case, we observe a zero
query string whereas in the latter case, we observe a query string
with a single key, "" and a zero value. Compare this with /?=
which has a single key and a single empty value,
"". Additionally, some query functions return lists of values
for a key. These list values are extracted from a single key
with a comma-separated value list. If a query string has multiple
identical keys, you must use Uri.query to retrieve the entirety of
the structured query string.
val query : t -> (string * string list) listval verbatim_query : t -> string optionUri.query and Uri.encoded_of_queryval encoded_of_query : ?scheme:string -> (string * string list) list -> stringval query_of_encoded : string -> (string * string list) listval with_query : t -> (string * string list) list -> tval with_query' : t -> (string * string) list -> tval get_query_param' : t -> string -> string list optionget_query_param' q key returns the list of values for the
key parameter in query q. Note that an empty list is not the
same as a None return value. For a query foo, the mapping is:/ returns None/?foo returns Some []/?foo= returns Some [""]/?foo=bar returns Some ["bar"]/?foo=bar,chi returns Some ["bar","chi"]Uri.query instead.val get_query_param : t -> string -> string optionget_query_param q key returns the value found for a key in
query q. If there are multiple values for the key, then the
first one is returned.val add_query_param : t -> string * string list -> tval add_query_param' : t -> string * string -> tval add_query_params : t -> (string * string list) list -> tval add_query_params' : t -> (string * string) list -> tval remove_query_param : t -> string -> tval path : t -> stringval path_and_query : t -> stringval with_path : t -> string -> tval scheme : t -> string optionval with_scheme : t -> string option -> tscheme.
Input URI is not modifiedval userinfo : t -> string optionval with_userinfo : t -> string option -> tstring option.
If no host is present in the supplied URI, an empty host is added.
Input URI is not modified.val user : t -> string optionval password : t -> string optionval with_password : t -> string option -> tstring option.
If no host is present in the supplied URI, an empty host is added.
Input URI is not modified.val host : t -> string optionval with_host : t -> string option -> tval host_with_default : ?default:string -> t -> stringval port : t -> int optionval with_port : t -> int option -> tval fragment : t -> string optionval with_fragment : t -> string option -> tval pp_hum : Format.formatter -> t -> unit