The uri-template Reference Manual

This is the uri-template Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 08:00:41 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 uri-template

An implementation of the URI Template proposed standard draft version 01.

Author

Vladimir Sedach <>

License

LGPL-3.0-or-later

Long Description

An implementation of the URI Template proposed standard draft version 01.
Lets you easily create and parse URIs by using the URI Template reader macro syntax.

Dependencies
  • cl-ppcre (system).
  • named-readtables (system).
  • flexi-streams (system).
Source

uri-template.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 uri-template/uri-template.asd

Source

uri-template.asd.

Parent Component

uri-template (system).

ASDF Systems

uri-template.


3.1.2 uri-template/package.lisp

Source

uri-template.asd.

Parent Component

uri-template (system).

Packages

uri-template.


3.1.3 uri-template/uri-template.lisp

Dependency

package.lisp (file).

Source

uri-template.asd.

Parent Component

uri-template (system).

Public Interface
Internals

3.1.4 uri-template/destructure-uri.lisp

Dependency

uri-template.lisp (file).

Source

uri-template.asd.

Parent Component

uri-template (system).

Public Interface
Internals

weak-register-groups-bind (macro).


4 Packages

Packages are listed by definition order.


4.1 uri-template

Source

package.lisp.

Use List
  • cl-ppcre.
  • common-lisp.
  • editor-hints.named-readtables.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: uri-decode?

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

Package

uri-template.

Source

destructure-uri.lisp.

Special Variable: uri-encode?

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

Package

uri-template.

Source

uri-template.lisp.


5.1.2 Macros

Macro: 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

Package

uri-template.

Source

destructure-uri.lisp.


5.1.3 Ordinary functions

Function: enable-uri-template-syntax ()

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

Package

uri-template.

Source

uri-template.lisp.

Function: 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.

Package

uri-template.

Source

uri-template.lisp.

Function: uri-decode (str)

Decodes URI encoded/escaped characters in the given string.

Package

uri-template.

Source

destructure-uri.lisp.

Function: uri-encode (str)

URI encodes/escapes the given string.

Package

uri-template.

Source

uri-template.lisp.

Function: 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.

Package

uri-template.

Source

uri-template.lisp.


5.2 Internals


5.2.1 Macros

Macro: maybe-uri-encode (x)
Package

uri-template.

Source

uri-template.lisp.

Macro: weak-register-groups-bind (vars regex str &body body)
Package

uri-template.

Source

destructure-uri.lisp.


5.2.2 Ordinary functions

Function: uri-template-reader (stream subchar arg)
Package

uri-template.

Source

uri-template.lisp.


Appendix A Indexes


A.1 Concepts