Work in progress implementation of URI templates for OCaml. (RFC6570 - http://tools.ietf.org/html/rfc6570)
Compliant to level 4
ODoc documentation avaliable here.
Easiest way to install is via opam:
$ opam install uritemplate
# #require "uritemplate";;
# Uritemplate.template_uri
~template:"https://example.com{/a}{?b*}{#e,f}"
~variables:[("a", `String "a");
("b", `Assoc [("b", "b"); ("c", "c")]);
("e", `String "e");
("f", `List ["f"; "g"])];;
- : string = "https://example.com/a?b=b&c=c#e,f,g"