Request Module

This XQuery Module contains functions for retrieving information on an HTTP request that has triggered the query. It is mostly useful when building Web Applications.

The module is based on the EXQuery Request Module draft.

=Conventions=


 * The module will be available if the basex-api library is found in the classpath. This is the case if you use one of the complete distributions of BaseX (zip, exe, war).
 * All functions are assigned to the  namespace, which is statically bound to the request prefix.
 * If any of the functions is called outside the servlet context,  is raised.

The following example illustrated what components a URI may consist of (the example is derived from RFC 3986):

foo://example.com:8042/over/there?name=ferret \_/  \_________/ \__/\_________/ \_________/   |         |       |       |          | scheme   hostname  port    path      query

=General Functions=

request:method
=URI Functions=

request:context-path
=Connection Functions=

request:remote-port
=Parameter Functions=

request:parameter
=Header Functions=

request:header
=Cookie Functions=

request:cookie
=Attribute Functions=

request:attribute
return type generalized, default argument added.

request:set-attribute
=Errors=

=Changelog=


 * Version 9.3


 * Added: request:attribute-names, request:set-attribute
 * Updated: request:attribute: return type generalized, default argument added


 * Version 7.9


 * Updated: The returned values of request:parameter-names, request:parameter now also include form field parameters.


 * Version 7.8


 * Added: request:context-path


 * Version 7.7


 * Added: request:attribute

This module was introduced with Version 7.5.