Hi,
i tried to return http-status 404, but my service returns status 400:
This is the code in my XQuery:
fn:error(xs:QName('error'), 'Invoice ' || $id || ' does not exist', 404)
This is what curl prints:
* Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8984 (#0)
GET /softwareberatung/revenues/2015/15-123 HTTP/1.1 Host: localhost:8984 User-Agent: curl/7.47.0 Accept: */*
< HTTP/1.1 400 Bad Request < Set-Cookie: JSESSIONID=cfedc7x61od51p8o40uxm8dfe;Path=/ < Expires: Thu, 01 Jan 1970 00:00:00 GMT < Content-Type: text/plain;charset=UTF-8 < Content-Length: 97 < Server: Jetty(8.1.18.v20150929) < Stopped at /home/christoph/basex/restxq/Revenue.xqm, 64/19: * Connection #0 to host localhost left intact [error] Invoice 15-123 does not exist
Regards
Christoph Gaukel
basex-talk@mailman.uni-konstanz.de