=Functions=
==request:parameter-names==
{|
|-
| width='90' | '''Signatures'''
|{{Func|request:parameter-names||xs:string*}}
|-
| '''Summary'''
|Returns the names of all query parameters contained in the HTTP request.
|}
==request:parameter==
{|
|-
| width='90' | '''Signatures'''
|{{Func|request:parameter|$name as xs:string|xs:string*}}
|-
| '''Summary'''
|Returns all strings bound to the query parameter specified by {{Code|$name}}.
|-
| '''Examples'''
|The following RESTXQ function can e.g. be called via <code><nowiki>http://localhost:8984/restxq/get?key=user</nowiki></code>:
<pre class="brush:xquery">
module namespace test = 'http://basex.org/examples/test';
import module namespace request = "http://exquery.org/ns/restxq/request";
declare
%restxq:path("/get")
function test:get()
{
'Value of parameter "key": ' || request:parameter('key')
};
</pre>
|}
==request:session-id==
|-
| width='90' | '''Signatures'''
|{{Func|request:session-id|$request as basex:request|xs:string}}
|-
| '''Summary'''
declare
%restxq:path("/id")
%restxq:request("{$req}") function test:id($req)
{
'ID: ' || request:session-id($req)
};
</pre>