XQuery Function Documentation
http://exist-db.org/xquery/response
java:org.exist.xquery.functions.response.ResponseModule
A module for dealing with HTTP responses.
response:exists
Returns whether a response object exists.
- Returns:
- xs:boolean : true if the response object exists
response:redirect-to
Sends a HTTP redirect response (302) to the client. Note: this is not supported by the Cocooon generator. Use a sitemap redirect instead.
- Parameters:
-
$uri The URI to redirect the client to - Returns:
- item()
response:set-cookie
Sets a HTTP Cookie on the HTTP Response.
- Parameters:
-
$name The cookie name $value The cookie value - Returns:
- item()
response:set-cookie
Sets a HTTP Cookie on the HTTP Response.
- Parameters:
-
$name The cookie name $value The cookie value $max-age? The xs:duration of the cookie $secure-flag? The flag for whether the cookie is to be secure (i.e., only transferred using HTTPS) - Returns:
- item()
response:set-cookie
Sets a HTTP Cookie on the HTTP Response.
- Parameters:
-
$name The cookie name $value The cookie value $max-age? The xs:duration of the cookie $secure-flag? The flag for whether the cookie is to be secure (i.e., only transferred using HTTPS) $domain? The cookie domain $path? The cookie path - Returns:
- item()
response:set-date-header
Sets a HTTP Header on the HTTP Response.
- Parameters:
-
$name The header name $value The header value - Returns:
- item()
response:set-header
Sets a HTTP Header on the HTTP Response.
- Parameters:
-
$name The header name $value The header value - Returns:
- item()
response:set-status-code
Sets a HTTP server status code on the HTTP Response.
- Parameters:
-
$code The status code - Returns:
- item()
response:stream
Stream can only be used within a servlet context. Itt directly streams its input to the servlet's output stream. It should thus be the last statement in the XQuery.
- Parameters:
-
$content* The source sequence $serialization-options The serialization options - Returns:
- item()
response:stream-binary
Streams the binary data to the current servlet response output stream. The ContentType HTTP header is set to the value given in $content-type.Note: the servlet output stream will be closed afterwards and mime-type settings in the prolog will not be passed.
- Parameters:
-
$binary-data The binary data to stream $content-type The ContentType HTTP header value $filename? The filename. If no filename is given, then the current request name is used - Returns:
- item()