Hi,
Is it possible with restxq to add a document to a db? And if so, to also return an http response?
I am trying to get the first part working with something along these lines:
declare %rest:path("form/") %rest:POST %rest:form-param("content","{$form-input}", "'no message delivered'") function page:add-doc($form-input as xs:string) {
let $new-doc:= <root> <tag> <form-data>{ $form-input }</form-data> </tag> </root>
return db:add("test_db", $new-doc, "test.xml") };
Many thanks, Colin