Dear list, I just came across the fact that BaseX does not recognize PATCH as a known HTTP verb (at least in my admittedly not bleading-edge version). Is this a feature or a bug? And, in order to work around that: is there a way of passing payload to a custom %rest:method (without having an additional PUT or POST annotation on the same XQuery function)? Thanks in advance! Best Daniel
Hi Daniel, I'm pretty sure that PATCH is supported in recent versions of BaseX. Even if I don't remember exactly when it started since it's not traced in the Changelog of the documentation page for RestXQ.
From the docs at [1]:
The HTTP method annotations are equivalent to allHTTP request methods http://en.wikipedia.org/wiki/HTTP#Request_methodsexcept TRACE and CONNECT. Zero or more methods may be used on a function; if none is specified, the function will be invoked for each method.
[1] http://docs.basex.org/wiki/RESTXQ
Ciao, Marco.
On 16/07/19 19:22, Schopper, Daniel wrote:
Dear list, I just came across the fact that BaseX does not recognize PATCH as a known HTTP verb (at least in my admittedly not bleading-edge version). Is this a feature or a bug? And, in order to work around that: is there a way of passing payload to a custom %rest:method (without having an additional PUT or POST annotation on the same XQuery function)? Thanks in advance! Best Daniel
Hi Daniel,
Thanks for your observation. I have added an issue [1]; let’s see what we can do.
Cheers, Christian
[1] https://github.com/BaseXdb/basex/issues/1702
On Tue, Jul 16, 2019 at 7:22 PM Schopper, Daniel Daniel.Schopper@oeaw.ac.at wrote:
Dear list, I just came across the fact that BaseX does not recognize PATCH as a known HTTP verb (at least in my admittedly not bleading-edge version). Is this a feature or a bug? And, in order to work around that: is there a way of passing payload to a custom %rest:method (without having an additional PUT or POST annotation on the same XQuery function)? Thanks in advance! Best Daniel
Good news: With the current version of BaseX, it’s already possible to supply a body with custom methods. I have revised our documentation:
http://docs.basex.org/wiki/RESTXQ#Custom_Methods
Hope this helps, Christian
On Thu, Jul 18, 2019 at 4:05 PM Christian Grün christian.gruen@gmail.com wrote:
Hi Daniel,
Thanks for your observation. I have added an issue [1]; let’s see what we can do.
Cheers, Christian
[1] https://github.com/BaseXdb/basex/issues/1702
On Tue, Jul 16, 2019 at 7:22 PM Schopper, Daniel Daniel.Schopper@oeaw.ac.at wrote:
Dear list, I just came across the fact that BaseX does not recognize PATCH as a known HTTP verb (at least in my admittedly not bleading-edge version). Is this a feature or a bug? And, in order to work around that: is there a way of passing payload to a custom %rest:method (without having an additional PUT or POST annotation on the same XQuery function)? Thanks in advance! Best Daniel
Very cool, this good news ideed! thank you very much for the – as always – swift response! Best Daniel
Am Donnerstag, den 18.07.2019, 18:20 +0200 schrieb Christian Grün:
Good news: With the current version of BaseX, it’s already possible to supply a body with custom methods. I have revised our documentation:
http://docs.basex.org/wiki/RESTXQ#Custom_Methods
Hope this helps, Christian
On Thu, Jul 18, 2019 at 4:05 PM Christian Grün christian.gruen@gmail.com wrote:
Hi Daniel,
Thanks for your observation. I have added an issue [1]; let’s see what we can do.
Cheers, Christian
[1] https://github.com/BaseXdb/basex/issues/1702
On Tue, Jul 16, 2019 at 7:22 PM Schopper, Daniel Daniel.Schopper@oeaw.ac.at wrote:
Dear list, I just came across the fact that BaseX does not recognize PATCH as a known HTTP verb (at least in my admittedly not bleading-edge version). Is this a feature or a bug? And, in order to work around that: is there a way of passing payload to a custom %rest:method (without having an additional PUT or POST annotation on the same XQuery function)? Thanks in advance! Best Daniel
basex-talk@mailman.uni-konstanz.de