XQuery Function Documentation
http://exquery.org/ns/request
java:org.exist.extensions.exquery.modules.request.RequestModule
EXQuery HTTP Request Module 1.0.
req:address #0
req:address () as xs:stringGets the IP address of the server that received the HTTP Request
- Returns:
- xs:string : The IP address of the server.
req:cookie #1
req:cookie ($cookie-name as xs:string) as xs:stringGets the value of the named Cookie in the HTTP Request. If there is no such cookie, then an empty sequence is returned.
- Parameters:
$cookie-name The name of the cookie to retrieve the value of. - Returns:
- xs:string? : The value of the named cookie, or an empty sequence.
req:cookie #2
req:cookie ($cookie-name as xs:string, $default as xs:string) as xs:stringGets he value of the named Cookie in the HTTP Request. If there is no such cookie in the HTTP Request, then the value specified in $default is returned instead.
- Parameters:
$cookie-name The name of the cookie to retrieve the value of. $default The default value to use if the named cookie is not present in the request. - Returns:
- xs:string : The value of the named cookie, or the default value.
req:header #1
req:header ($header-name as xs:string) as xs:stringGets the value of the named HTTP Header in the HTTP Request. If there is no such header, then an empty sequence is returned.
- Parameters:
$header-name The name of the HTTP Header to retrieve the value of. - Returns:
- xs:string? : The value of the named HTTP Header, or an empty sequence.
req:header #2
req:header ($header-name as xs:string, $default as xs:string) as xs:stringGets the value of the named HTTP Header in the HTTP Request. If there is no such header in the HTTP Request, then the value specified in $default is returned instead.
- Parameters:
$header-name The name of the HTTP Header to retrieve the value of. $default The default value to use if the named HTTP Header is not present in the request. - Returns:
- xs:string : The value of the named HTTP Header, or the default value.
req:header-names #0
req:header-names () as xs:stringGets the names of HTTP Headers available in the HTTP Request.
- Returns:
- xs:string+ : The names of available HTTP Headers in the HTTP Request.
req:hostname #0
req:hostname () as xs:stringGets the Hostname fragment of the Authority component of the URI of the HTTP Request.
- Returns:
- xs:string : The Hostname of the HTTP Request.
req:method #0
req:method () as xs:stringGets the HTTP Method of the Request e.g. GET.
- Returns:
- xs:string : The HTTP Method.
req:parameter #1
req:parameter ($parameter-name as xs:string) as xs:stringGets the values of the named parameter from the HTTP Request. If there is no such parameter in the HTTP Request, then an empty sequence is returned.
- Parameters:
$parameter-name The name of the parameter to retrieve values of. - Returns:
- xs:string* : The value(s) of the named parameter, or an empty sequence.
req:parameter #2
req:parameter ($parameter-name as xs:string, $default as xs:string*) as xs:stringGets the values of the named parameter from the HTTP Request. If there is no such parameter in the HTTP Request, then the value specified in $default is returned instead.
- Parameters:
$parameter-name The name of the parameter to retrieve values of. $default The default value(s) to use if the named parameter is not present in the request. - Returns:
- xs:string* : The value(s) of the named parameter, or the default value(s).
req:parameter-names #0
req:parameter-names () as xs:stringGets the names of parameters available in the HTTP Request.
- Returns:
- xs:string* : The names of available parameters from the HTTP Request.
req:path #0
req:path () as xs:stringGets the Path component of the URI of the HTTP Request.
- Returns:
- xs:string : The Path of the URI of the HTTP Request.
req:port #0
req:port () as xs:integerGets the Port fragment of the Authority component of the URI of the HTTP Request. If the port is not explicitly specified in the URI, then the default port for the HTTP Scheme is returned (i.e. 21 for FTP, 80 for HTTP and 443 for HTTPS).
- Returns:
- xs:integer : The Port of the HTTP Request.
req:query #0
req:query () as xs:stringGets the Query Component of the HTTP Request URI, if there is no query component then an empty sequence is returned.
- Returns:
- xs:string? : The Query of the URI of the HTTP Request.
req:remote-address #0
req:remote-address () as xs:integerGets the IP address of the client or the last proxy that sent the HTTP Request.
- Returns:
- xs:integer : The IP address of the client.
req:remote-hostname #0
req:remote-hostname () as xs:stringGets the fully qualified hostname of the client or the last proxy that sent the HTTP Request. If the name of the remote host cannot be established, this method behaves as request:remote-address(), and returns the IP address.
- Returns:
- xs:string : The Hostname of the client that issues the HTTP Request.
req:remote-port #0
req:remote-port () as xs:integerGets the TCP port number of the client socket or the last proxy that sent the HTTP Request..
- Returns:
- xs:integer : The TCP port number of the client.
req:scheme #0
req:scheme () as xs:stringGets the Scheme of the HTTP Request e.g. https.
- Returns:
- xs:string : The Scheme of the HTTP Request.
req:uri #0
req:uri () as xs:stringGets the URI of the HTTP Request URI.
- Returns:
- xs:string? : The URI of the HTTP Request.