Source

amall / src / uri.mli

type uri = Uri_type.uri
 and authority = Uri_type.authority
 and host_kind = Uri_type.authority
;

value parse : string -> option uri
;

value dump_uri : uri -> string
;

(* uri.path -- segmented, normalized *)
value normseg_of_uri : uri -> list string
;

(* parses "host (':' port_opt)?" string, returns
   (host_kind, host_string, port_option_int)
 *)
value parse_host_portopt :
  string -> option (Uri_type.host_kind * string * option int)
;

(* parses query string "?a=b&c=d" (found in Uri_type.query without '?')
   to list of ("key", "value") pairs, urldecoding them.  Key-value pairs
   in query string are delimited by '&' or ';'.  When there is no '='
   in key-value pair, it's assumed that value is an empty string.
   Key-value pair "=val" is ignored instead of storing it as ("", "val").
 *)
value parse_params : string -> list (string * string)
;