REST example wrong on wiki?
Saturday, 29 October 2011 · 2 messages · last reply 30 Oct 2011
FG
Florent Georges29 Oct 2011 15:33 #
Hi,
If I try the first POST example in the "Command Line" examples section at the end of http://docs.basex.org/wiki/REST, I get the following response from the REST server:
HTTP/1.1 400 Bad Request
Content-Length: 24
Server: Jetty(6.1.26)
Unknown parameter: count
For the records, the command is:
curl -i -X POST -H "Content-Type: application/xml" \
-d "<query xmlns='http://www.basex.org/rest'><text>//city/name</text><parameter name='count' value='5'/></query>" \ "admin:admin@localhost:8984/rest/factbook"
Regards,
--
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/
CG
Christian Grün30 Oct 2011 01:01 #
Thanks Florent,
I've revised the examples; the count parameter has been dismissed in our new REST API, as it can also be represented via XQuery itself.
Christian
Quoted text · Florent Georges · 31 lines
On Sat, Oct 29, 2011 at 3:33 PM, Florent Georges <lists at fgeorges.org> wrote: > Hi, > > If I try the first POST example in the "Command Line" examples > section at the end of http://docs.basex.org/wiki/REST, I get the > following response from the REST server: > > HTTP/1.1 400 Bad Request > Content-Length: 24 > Server: Jetty(6.1.26) > > Unknown parameter: count > > For the records, the command is: > > curl -i -X POST -H "Content-Type: application/xml" \ > -d "<query xmlns='http://www.basex.org/rest'><text>//city/name</text><parameter name='count' value='5'/></query>" \ > "admin:admin@localhost:8984/rest/factbook" > > Regards, > > > -- > Florent Georges > http://fgeorges.org/ > http://h2oconsulting.be/ > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
Written for BaseX 7.0. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery