Module Tiny_httpd_server.Route
val int : (int -> 'a, 'a) compMatches an integer.
val string : (string -> 'a, 'a) compMatches a string not containing
'/'and binds it as is.
val string_urlencoded : (string -> 'a, 'a) compMatches a URL-encoded string, and decodes it.
val exact : string -> ('a, 'a) compexact "s"matches"s"and nothing else.
val return : ('a, 'a) tMatches the empty path.
val rest_of_path : (string -> 'a, 'a) tMatches a string, even containing
'/'. This will match the entirety of the remaining route.- since
- 0.7
val rest_of_path_urlencoded : (string -> 'a, 'a) tMatches a string, even containing
'/', an URL-decode it. This will match the entirety of the remaining route.- since
- 0.7
val (@/) : ('a, 'b) comp -> ('b, 'c) t -> ('a, 'c) tcomp / routematches"foo/bar/…"iffcompmatches"foo", androutematches"bar/…".
val exact_path : string -> ('a, 'b) t -> ('a, 'b) texact_path "foo/bar/..." ris equivalent toexact "foo" @/ exact "bar" @/ ... @/ r- since
- 0.11 *
val pp : Stdlib.Format.formatter -> (_, _) t -> unitPrint the route.
- since
- 0.7
val to_string : (_, _) t -> stringPrint the route.
- since
- 0.7