<syntaxhighlight lang="xml">
<rest:forward>/a/b</rest:forward>
</syntaxhighlightpre>
|}
</http:response>
</rest:response>
</syntaxhighlightpre>
|}
<output:serialization-parameters xmlns:output="http://www.w3.org/2010/xslt-xquery-serialization"/>
</rest:response>
</syntaxhighlightpre>
* The following expression returns a media-type for binary data, a caching directive, and the OK status:<br/>
<pre lang='xquery'>
map { 'status': 200, 'message': 'OK' }
)
</syntaxhighlightpre>
* The following RESTXQ function returns the contents of a file to the client with correct media type:<br/>
<pre lang='xquery'>
)
};
</syntaxhighlightpre>
|}