View Source Maverick.Path (Maverick v0.3.0)
Provides functionality for parsing paths to lists of path nodes, identifying path variables for pattern matching on incoming requests.
Link to this section Summary
Functions
Parse a path string to a list of path nodes. A path node is either
a String.t()
or a tuple of {:variable, String.t()}
. Nodes
beginning with a colon character (":") will parse to a variable
tuple. At runtime, variable tuples are used to construct the
path params portion of a Maverick request.
Reads a path string and validates as a Maverick-compatible path, including any colon (":") characters signifying a path variable. Strips any extraneous forward slashes from the result.
Link to this section Types
Link to this section Functions
Parse a path string to a list of path nodes. A path node is either
a String.t()
or a tuple of {:variable, String.t()}
. Nodes
beginning with a colon character (":") will parse to a variable
tuple. At runtime, variable tuples are used to construct the
path params portion of a Maverick request.
Reads a path string and validates as a Maverick-compatible path, including any colon (":") characters signifying a path variable. Strips any extraneous forward slashes from the result.