Tiny_httpd_util
val percent_encode : ?skip:( char -> bool ) -> string -> string
Encode the string into a valid path following https://tools.ietf.org/html/rfc3986#section-2.1
if provided, allows to preserve some characters, e.g. '/' in a path.
val percent_decode : string -> string option
Inverse operation of percent_encode. Can fail since some strings are not valid percent encodings.
percent_encode
val split_query : string -> string * string
Split a path between the path and the query
val split_on_slash : string -> string list
Split a string on '/', remove the trailing '/' if any.
'/'
val get_non_query_path : string -> string
get the part of the path that is not the query parameters.
val get_query : string -> string
Obtain the query part of a path.
val parse_query : string -> ( (string * string) list, string ) Stdlib.result
Parse a query as a list of '&' or ';' separated key=value pairs. The order might not be preserved.
'&'
';'
key=value