From: Joseph B. <jo...@gm...> - 2013-03-30 04:55:47
|
Hi Adam, Thanks for the information; that's exactly what I was looking for. I should've read the spec in more detail first … Thanks. -jb On Thu, Mar 28, 2013 at 5:31 PM, Adam Retter <ad...@ex...> wrote: > There is a very new Request module that is supported in RESTXQ but it > is definetly likely to change which is why it is not publicised yet - > > http://exquery.github.com/expath-specs-playground/request-module-1.0-specification.html > > If you want to set the Response status code, then you can return a > sequence from your RESTXQ function, the first item in the response > sequence should be a rest:response element, the second thing (if > present) is the response body of your function. > > e.g. To set the status code and return a body- > > (<rest:response><http:response status="404"/></rest:response>, > "Document Not found") > > You can find some details here - > http://www.adamretter.org.uk/papers/restful-xquery_january-2012.pdf > See section 4.5 and in particular section 4.5.1 > > ro...@ec... > > On 28 March 2013 05:14, Joseph Bryan <jo...@gm...> wrote: > > Hi All, > > > > I've been researching the RestXQ implementation in eXist-db, and I'm > having > > trouble setting the HTTP response status code. As has been discussed > here, > > http://markmail.org/message/glhnhcdysfabdnlb?q=restxq+response+status, > the > > request, session, and response modules are not supported through RestXQ. > > > > The linked email thread contains mention of returning an http:response > > element, but I can't find any documentation of that functionality. Is > that > > the only way to set the HTTP status code through RestXQ, and, if so, can > > someone point me to docs or samples? > > > > Thanks. > > > > -jb > > > > > ------------------------------------------------------------------------------ > > Own the Future-Intel® Level Up Game Demo Contest 2013 > > Rise to greatness in Intel's independent game demo contest. > > Compete for recognition, cash, and the chance to get your game > > on Steam. $5K grand prize plus 10 genre and skill prizes. > > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > > _______________________________________________ > > Exist-open mailing list > > Exi...@li... > > https://lists.sourceforge.net/lists/listinfo/exist-open > > > > > > -- > Adam Retter > > eXist Developer > { United Kingdom } > ad...@ex... > irc://irc.freenode.net/existdb > |