55 lines
No EOL
5.2 KiB
HTML
55 lines
No EOL
5.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>CLiki: uri-template</title>
|
|
<link rel="alternate" type="application/atom+xml" title="ATOM feed of edits to current article"
|
|
href="https://www.cliki.net/site/feed/article.atom?title=uri-template">
|
|
<link rel="stylesheet" href="static/css/style.css">
|
|
<link rel="stylesheet" href="static/css/colorize.css">
|
|
</head>
|
|
|
|
<body>
|
|
<span class="hidden">CLiki - uri-template</span>
|
|
<div id="content"><div id="content-area"><div id="article-title">uri-template</div><div id="article">uri-template is an implementation of the <a href="https://tools.ietf.org/html/draft-gregorio-uritemplate-01">URI Template proposed standard draft version 01</a> as a
|
|
reader macro, used for both creating and parsing <a href="URI.html" class="category">URI</a>s.<p>Although uri-template does not implement the operators introduced in the <a href="https://tools.ietf.org/html/draft-gregorio-uritemplate-02">02</a> and later drafts of the URI Template standard, it does allow arbitrary Lisp expressions in template placeholders, which gives simpler and more powerful templates.<p>Examples use:<p>Template interpolation:<p><div class="code"><span class="nonparen"><span class="paren1">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/speope_letcm_letst.html" class="symbol"><i><span class="symbol">let</span></i></a> <span class="paren2">(<span class="nonparen"><span class="paren3">(<span class="nonparen">foo 1</span>)</span></span>)</span>
|
|
https://www.example.com/widget/{foo}/parts</span>)</span></span></div><p><samp>=> "https://www.example.com/widget/1/parts"</samp><p>Template destructuring:<p><div class="code"><span class="nonparen"><span class="paren1">(<span class="nonparen">uri-template-bind <span class="paren2">(<span class="nonparen">#Uhttps://www.example.com/{part}/{number}</span>)</span>
|
|
<span class="string">"https://www.example.com/widget/1"</span>
|
|
<span class="paren2">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/any_list.html" class="symbol">list</a> part <span class="paren3">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/fun_parse-integer.html" class="symbol">parse-integer</a> <a href="https://www.cliki.net/site/HyperSpec/Body/syscla_number.html" class="symbol">number</a></span>)</span> %uri-host</span>)</span></span>)</span></span></div><p><samp>=> ("widget" 1 "www.example.com")</samp><p>License: LGPL-3.0-or-later<p>Homepage: <a href="https://common-lisp.net/project/uri-template/">https://common-lisp.net/project/uri-template/</a><p>Source repository: <a href="https://gitlab.common-lisp.net/uri-template/uri-template.git">https://gitlab.common-lisp.net/uri-template/uri-template.git</a><p>Mailing list: <a href="mailto:uri-template-devel@common-lisp.net">uri-template-devel@common-lisp.net</a><p>Author: <a href="Vladimir Sedach.html" class="internal">Vladimir Sedach</a><p>Related projects: <a href="puri.html" class="internal">puri</a> (URI parsing and representation) <a href="cl-uri-templates.html" class="internal">cl-uri-templates</a> (fork of uri-template supporting operators)</div></div>
|
|
<div id="footer" class="buttonbar"><ul><li><a href="uri-template.html">Current version</a></li>
|
|
<li><a href="https://www.cliki.net/site/history?article=uri-template">History</a></li>
|
|
<li><a href="https://www.cliki.net/site/backlinks?article=uri-template">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=uri-template&from-revision=3773679262">Edit</a></li><li><a href="https://www.cliki.net/site/edit-article?create=t">Create</a></li></ul></div>
|
|
</div>
|
|
<div id="header-buttons" class="buttonbar">
|
|
<ul>
|
|
<li><a href="https://www.cliki.net/">Home</a></li>
|
|
<li><a href="https://www.cliki.net/site/recent-changes">Recent Changes</a></li>
|
|
<li><a href="CLiki.html">About</a></li>
|
|
<li><a href="Text Formatting.html">Text Formatting</a></li>
|
|
<li><a href="https://www.cliki.net/site/tools">Tools</a></li>
|
|
</ul>
|
|
<div id="search">
|
|
<form action="https://www.cliki.net/site/search">
|
|
<label for="search_query" class="hidden">Search CLiki</label>
|
|
<input type="text" name="query" id="search_query" value="" />
|
|
<input type="submit" value="search" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div id="pageheader">
|
|
<div id="header">
|
|
<span id="logo">CLiki</span>
|
|
<span id="slogan">the common lisp wiki</span>
|
|
<div id="login"><form method="post" action="https://www.cliki.net/site/login">
|
|
<label for="login_name" class="hidden">Account name</label>
|
|
<input type="text" name="name" id="login_name" class="login_input" />
|
|
<label for= "login_password" class="hidden">Password</label>
|
|
<input type="password" name="password" id="login_password" class="login_input" />
|
|
<input type="submit" name="login" value="login" id="login_submit" /><br />
|
|
<div id="register"><a href="https://www.cliki.net/site/register">register</a></div>
|
|
<input type="submit" name="reset-pw" value="reset password" id="reset_pw" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body></html> |