===Query Strings===
<code>%rest:query-param()</code>
Assigns <em>first parameter</em> to the variable in <em>second parameter</em> if found in the [http://en.wikipedia.org/wiki/Query_string Query String]. As optional <em>third parameter</em> a default value may be given. Is no default set and the parameter not contained in the Query-String, the REST annotation will be ignored.
The variable will be type-casted to match the function declaration.
ExamplesThe value of the <em>first parameter</em>, if found in the [http://en.wikipedia.org/wiki/Query_string Query String], will be assigned to the variable specified as <em>second parameter</em>. Optionally, a <em>third parameter</em> may be specified as default: * <codepre class="brush:xquery">%rest:query-param("parameter", "{$value}", "default")</code>* <code>%rest:query-param("answer", "{$answer}", 42)</code>* <code>%rest:query-param("search", "{$search-param}")</codepre>
===HTML Form Fields===
<code>%rest:form-param()</code>Form parameters are specified the same usage way as [[#Query Strings]], but . Their values are extracted from GET or POST or GETrequests. <!-- TODO remark on file submission -pre class="brush:xquery">%rest:form-param("parameter", "{$value}", "default")</pre>
===HTTP Headers===
<code>%rest:header-param()</code>Header parameters are specified the same usage way as [[#Query Strings]], but extracted from HTTP Header.:
Examples* <codepre class="brush:xquery">%rest:header-param("User-Agent","{$user-agent}")</code>* <code>%rest:header-param("Referer","{$referer}", "none")</codepre>
===Cookies===
<code>%rest:cookie-param()</code>Cookie parameters are specified the same usage way as [[#Query Strings]], but extracted from Cookie.:
Examples* <codepre class="brush:xquery">%rest:cookie-param("username","{$user}")</code>* <code>%rest:cookie-param("authentication","{$auth}", "no_auth")</codepre>
=References=