Library
Module
Module type
Parameter
Class
Class type
exception Error of error
val string_of_error : error -> string
val iri :
?scheme:string ->
?user:string ->
?host:string ->
?port:int ->
?path:path ->
?query_kv:query_kv ->
?query:string ->
?fragment:string ->
unit ->
t
val is_absolute : t -> bool
true
if fragment is None and scheme is not empty.
val is_relative : t -> bool
true
is scheme is empty.
val of_string :
?pctdecode:bool ->
?pos:Stdlib.Lexing.position ->
?normalize:bool ->
string ->
t
Read an IRI from the given string.
val to_string : ?pctencode:bool -> t -> string
Return a string representation of the given IRI.
val to_string_details : t -> string
Return a debug purpose string representation of the given IRI.
val pp : Stdlib.Format.formatter -> t -> unit
Print the given IRI to the given formatter, using to_string ?pctencode:None
.
val pp_details : Stdlib.Format.formatter -> t -> unit
Print a debug purpose reprensetation of the given IRI to the given formatter, using to_string_details
.
val scheme : t -> string
val user : t -> string option
val host : t -> string option
val port : t -> int option
val path_string : ?pctencode:bool -> t -> string
Append the given (not %-encoded) string list to the path of the given iri and return a new iri with this path.
val query : t -> string option
Query string is not %-decoded as it is not parsed to name/value pairs
Return a new iri with the given optional query string. This string must already be %-encoded.
Return a new iri with the given list of key/value pairs. The givn string must be %-decoded.
val query_get : t -> string -> string
val query_opt : t -> string -> string option
val fragment : t -> string option
val parse_http_link : string -> (string * t) list
val to_uri : t -> string
Return a correctly pct-encoded URI as a string, from the given IRI.