<pre class="brush:xml">
declare %rest:path("hello/{$world}")
%rest:POST
%rest:form-param("content","{$post-contentmessage}", "'no message delivered'") function page:hello-postman($world message as xs:string, $post-content as document-node()) {
<response>
<title>Hello { $world }!</title> <info>It seems you posted a message : { $post-content message }.</info>
</response>
};
If you posted something (e.g. using curl or the embedded formular http://localhost:8984/restxq/ )
<pre class="brush:shell">
curl -i -X POST -H "content-type: application/xml" -d 'content="Here comes the post!"' 'http://admin:admin@localhost:8984/restxq/hello/mr-postman'
</pre>
You would recieve
<pre class="brush:xml">
<response>
<title>Hello mr-postman!</title> <info>It seems you posted a message > "Here comes the post!".</info>
</response>
</pre>