</pre>
=restxq:responseResponse=
Since RESTXQ runs on a fully equipped Web-server, one can change all and specify more HTTP header informations that are returned to the client. By default , a successful request is answered with HTTP status code "200 OK" followed by the given content, an erroneous request (due to errors in a script) with "404 Not Found" followed by the error message.
The first behaviour behavior can be changed by returning an <code>restxq:response</code> element, following the [http://expath.org/spec/http-client EXPath HTTP Client Module] specification. E.g. one may return to the client
<pre class="brush:xml">
Compare [http://en.wikipedia.org/wiki/List_of_HTTP_status_codes List of HTTP status codes] to see what status code fits.
It is mandatory to first place <code>restxq:response</code> followed by the content (of any kind) if any. In case of an updating function , use [[Database_Module#db:output|db:output()]] to return the element and the content. If specified "Content-Type" overrides %output:media-type().
=Forward and Redirect=