Hi Christian,
%rest:ANY would route all HTTP methods through that function. Basically saying I don't care which method you call me with. So it has nothing to do with the paths.
Hth
--Marc
On Mon, Dec 1, 2014 at 4:52 PM, Christian Grün christian.gruen@gmail.com wrote:
Hi Max, hi Marc,
The %rest:path annotation in BaseX 8.0 allows regular expressions [1]; I guess this is what you need?
Best, Christian
[1] http://docs.basex.org/wiki/RESTXQ#Paths
On Mon, Dec 1, 2014 at 3:51 PM, Maximilian Gärber mgaerber@arcor.de wrote:
I guess this request is reasonable:
https://github.com/xokomola/fold/blob/master/webapp/fold/adapter/basex-restx...
@Christian: would %rest:ANY or some sort of wildcard notion be possible?
Regards,
Maxi
2014-11-26 22:12 GMT+01:00 Marc van Grootel marc.van.grootel@gmail.com:
I agree. I'm not using Fold at work either ;-) and I'm also not knocking RESTXQ in any way as, yes, it's the closest to a standard and has many implementations.
I do think that experimenting with other approaches is good. Some languages use something like Fold with great success and uptake. Often as a base library on top of which other routing libraries/DSL's are created fostering even more diverse approaches.
For the time being this will stay based on RESTXQ and stay away from Java but it does feel clumsy and duplicating basic HTTP request plumbing.
ah well.... we'll see ...
--Marc
On Wed, Nov 26, 2014 at 9:49 PM, Maximilian Gärber mgaerber@arcor.de wrote:
+1
I'd keep using restxq - maybe without the need for servlets sometime but it is the closest to a xquery webapp standard we've got
Am 25.11.2014 23:28 schrieb "Marc van Grootel" marc.van.grootel@gmail.com:
Hi,
I would like to announce a new library (very alpha) called Fold.
https://github.com/xokomola/fold
It is a an HTTP routing library which provides an alternative way to map HTTP requests to XQuery functions. In future I hope to use this together with Origami to build REST services and small web apps.
My main goal of announcing this is to get feedback on how to improve this. Currently it is defined on top of RESTXQ but in future this might be handled by a Java extension. There are parts missing still and I strongly advise you not to use this for a serious project.
Performance gets bad quite quickly. Performance gains may very well be possible by XQuery refactorings. I basically wrote this as a port from a couple of Clojure libraries.
A bit of documentation for this library and for Origami can be found in each project's wiki. Note that I only just started these and they are not complete.
I'll be working on this library over the next month to get it into a more usable shape.
Happy to receive comments and improvements.
--Marc
-- --Marc