Common Lisp Package: URI-TEMPLATE

README:

FUNCTION

Public

ENABLE-URI-TEMPLATE-SYNTAX

Binds the #U dispatch character to read a URI template.

READ-URI-TEMPLATE (STREAM &OPTIONAL RECURSIVE-P)

A function suitable for inserting into the readtable so you can read URI templates from your own dispatch character.

URI-DECODE (STR)

Decodes URI encoded/escaped characters in the given string.

URI-ENCODE (STR)

URI encodes/escapes the given string.

URI-TEMPLATE (&REST TEMPLATE-ARGS)

The car of the list that the URI template reader produces. A function or macro. This symbol also names the named-readtables readtable that provides the #U dispatch macro.

Private

Undocumented

URI-TEMPLATE-READER (STREAM SUBCHAR ARG)

MACRO

Public

URI-TEMPLATE-BIND ((TEMPLATE) URI &BODY BODY)

Binds URI template placeholders (which must be symbols) in given URI, as well as attempting to bind a set of standard URI components to their respective parts of the given URI. Body executes only if all explicitly specified URI template placeholders can be bound. Given the example URI http://user@www.foo.com:8080/dir/abc?bar=baz&xyz=1#hash The standard URI components look like: %uri-scheme http %uri-authority user@www.foo.com:8080 %uri-user user %uri-host www.foo.com %uri-port 8080 %uri-path /dir/abc %uri-directory /dir/ %uri-file abc %uri-query bar=baz&xyz=1 %uri-fragment hash %uri-head http://user@www.foo.com:8080 %uri-tail /dir/abc?bar=baz&xyz=1#hash

Private

Undocumented

MAYBE-URI-ENCODE (X)

WEAK-REGISTER-GROUPS-BIND (VARS REGEX STR &BODY BODY)

VARIABLE

Public

URI-DECODE?

Controls whether URI decoding/unescaping is done on the templated value when destructuring. True by default.

URI-ENCODE?

Controls whether URI encoding/escaping is done on the templated value. True by default.