request:is-multipart-content
Determine if the request contains multipart/form-data
- Returns:
- xs:boolean : true is the request is a multipart/form-data request else false.
A module for dealing with HTTP requests.
Returns the names of all request attributes in the current request.
Returns whether a request object exists.
Returns the string value of the request attribute specified in the argument or the empty sequence if no such attribute exists. The attribute value should be a string.
$attribute-name | The name of the attribute |
Returns the context path of the current request, i.e. the portion of the request URI that indicates the context of the request.
Returns the names of all Cookies in the request
Returns the value of a named Cookie.
$cookie-name | The name of the cookie to retrieve the value from. |
Returns the content of a POST request. If the HTTP Content-Type header in the request identifies it as a binary document, then xs:base64Binary is returned. If its not a binary document, we attempt to parse it as XML and return a document-node(). If its not a binary or XML document, any other data type is returned as an xs:string representation or an empty sequence if there is no data to be read.
Returns the URI of the current request. If the request was forwarded via URL rewriting, the function returns the effective, rewritten URI, not the original URI which was received from the client.
Returns the HTTP request header identified by $header-name. The list of all headers included in the HTTP request are available through the request:get-header-names function.
$header-name | The HTTP request header name |
Returns a sequence containing the names of all headers passed in the current request
Returns the hostname of the current request.
Returns the HTTP method of the current request.
Returns the HTTP request parameter identified by $name. If the parameter could not be found, the default value is returned instead. Note: this function will not try to expand predefined entities like & or <, so a & passed through a parameter will indeed be treated as an & character.
$name | The parameter name |
$default-value* | The default value if the parameter does not exist |
Returns the HTTP request parameter identified by $name. If the parameter could not be found, the default value is returned instead. Note: this function will not try to expand predefined entities like & or <, so a & passed through a parameter will indeed be treated as an & character.
$name | The parameter name |
$default-value* | The default value if the parameter does not exist |
$failonerror* | The fail on error flag. If the value is set to false, then the function will not fail if there is no request in scope. |
Returns a sequence containing the names of all parameters passed in the current request
Returns any extra path information associated with the URL the client sent when it made this request. For example an xquery GET or POST to /some/path/myfile.xq/extra/path will return /extra/path when myfile.xq is executed.
Returns the full query string passed to the servlet (without the initial question mark).
Returns the IP address of the client machine that made the current request, as a string.
Returns the fully qualified name of the client or the last proxy that sent the current request.
Returns the Internet Protocol (IP) source port of the client or last proxy that sent the current request.
Returns the name of the scheme used in the current request, for example, http, https, or ftp.
Returns the server nodename of the current request.
Returns the server port of the current request.
Returns the servlet path of the current request, i.e. the portion of the request URI that points to the servlet which is handling the request. For example an xquery GET or POST to /some/path/myfile.xq/extra/path will return /some/path/myfile.xq when myfile.xq is executed.
Retrieve the base64 encoded data where the file part of a multi-part request has been stored. Returns the empty sequence if the request is not a multi-part request or the parameter name does not point to a file part.
$upload-param-name | The parameter name |
Retrieve the file name of an uploaded file from a multi-part request. This returns the file name of the file on the client (without path). Returns the empty sequence if the request is not a multi-part request or the parameter name does not point to a file part.
$upload-param-name | The parameter name |
Retrieve the size of an uploaded file from a multi-part request. This returns the size of the file in bytes. Returns the empty sequence if the request is not a multi-part request or the parameter name does not point to a file part.
$upload-param-name | The parameter name |
Returns the URI of the current request. This will be the original URI as received from the client. Possible modifications done by the URL rewriter will not be visible.
Returns the URL of the current request.
Determine if the request contains multipart/form-data
Stores a value in the current request using the supplied attribute name.
$name | The attribute name |
$value* | The attribute value |