PATCH verb in RestXQ implementation

Tuesday, 16 July 2019 · 5 messages · last reply 19 Jul 2019
SD
Schopper, Daniel16 Jul 2019 19:22 #
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
ML
Marco Lettere17 Jul 2019 10:03 #
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_methods>except 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.
Quoted text · Daniel · 11 lines
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
CG
Christian Grünin reply to Schopper, Daniel, 16 Jul 2019, 19:2218 Jul 2019 16:05 #
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
Quoted text · Daniel · 9 lines
On Tue, Jul 16, 2019 at 7:22 PM Schopper, Daniel <Daniel.Schopper at 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
CG
Christian Grün18 Jul 2019 18:20 #
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
Quoted text · Christian Grün · 23 lines
On Thu, Jul 18, 2019 at 4:05 PM Christian Grün <christian.gruen at 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 at 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
SD
Schopper, Daniel19 Jul 2019 13:52 #
Very cool, this good news ideed! thank you very much for the – as always – swift response! Best Daniel
Quoted text · +0200 · 40 lines
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 at 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 at 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
-- Mag. Daniel Schopper Austrian Centre for Digital Humanities Working Group Data, Resources and Standards Austrian Academy of Sciences Sonnenfelsgasse 19 1010 Vienna T: +43 1 51581-2216 E: daniel.schopper at oeaw.ac.at

⚡Generated with XQuery