package uritemplate

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type variable = [
  1. | `String of string
  2. | `List of string list
  3. | `Assoc of (string * string) list
]

The type of a variable that can be templated

val template_uri : template:string -> variables:(string * variable) list -> string

Templates the given string using the provided variables. Currently only compliant to level 3. See RFC6570

val template_uri_with_strings : template:string -> variables:(string * string) list -> string

A shorthand for template_uri when all variables are single strings

val template_uri_with_lists : template:string -> variables:(string * string list) list -> string

A shorthand for template_uri when all variables are lists of strings

val template_uri_with_assoc_list : template:string -> variables:(string * (string * string) list) list -> string

A shorthand for template_uri when all variables are association lists

OCaml

Innovation. Community. Security.