Hi,
I'm having problems with updating expressions using REST.
Non-updating queries execute fine without errors but when I use updating expressions the REST service returns a 400 (bad request) error.
For instance: the following body of a POST request <run xmlns='http://basex.org/rest'><text>insertDummy.xq</text></run>
with code in file insertDummy.xq: xquery version '3.0'; insert node <structure>nada</structure> into collection("component")/structures
sent to: http://admin:admin@localhost:8984/rest/component/
returns a "(400) Bad request" error
while if I substitute the code in file insertDummy.xq for a non updating expression such as: xquery version '3.0'; let $r := collection("component")/structures return $r
it works fine!
I suspected this was a result of user rights so I added the admin credentials to the http path. No change, problem persists. Also, I de-installed the program, made sure all files were gone, and then re-installed the (win PC) program again to wipe any weird settings I may have changed. Still no luck...
The above code did work on a previous installation (I beleive I was using 7.7.1).
Any help would be highly appriciated.
Many thanks, Fredrik Hedberg