package uritemplate

  1. Overview
  2. Docs

Module UritemplateSource

Sourcemodule Template : sig ... end
Sourcemodule Parser : sig ... end
Sourcemodule Expansion : sig ... end
Sourcemodule Expansion_type : sig ... end
Sourcetype 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

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

Templates the given string using the provided variables. Compliant to level 4. See RFC6570

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

A shorthand for template_uri when all variables are single strings

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

A shorthand for template_uri when all variables are lists of strings

Sourceval 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.