XQuery Function Documentation

Search and Browse

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

Gets 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:string

Gets the value of the named Cookie in the HTTP Request. If there is no such cookie, then an empty sequence is returned.

Parameters:
$cookie-nameThe 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:string

Gets 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-nameThe name of the cookie to retrieve the value of.
$defaultThe 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:string

Gets 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-nameThe 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:string

Gets 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-nameThe name of the HTTP Header to retrieve the value of.
$defaultThe 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:string

Gets 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:string

Gets 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:string

Gets 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:string

Gets 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-nameThe 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:string

Gets 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-nameThe name of the parameter to retrieve values of.
$defaultThe 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:string

Gets 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:string

Gets 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:integer

Gets 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:string

Gets 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:integer

Gets 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:string

Gets 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:integer

Gets 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:string

Gets 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:string

Gets the URI of the HTTP Request URI.

Returns:
xs:string? : The URI of the HTTP Request.