From: Andrzej J. T. <an...@ch...> - 2007-08-30 19:34:56
|
I noticed that there are functions to set cookies and headers for HTTP responses, but there doesn't seem to be a way to set the response code. When using XQuery to process HTTP requests, it would be nice to be able to specify alternate return codes, like a 404 Bad Request, 405 Method Not Allowed, 201 Created, etc. That way, you could use an XQuery to implement a REST-based application interface. Any way of doing this, or will I have to extend the response module to include a set-code() method? Thx! Andrzej Jan Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |
From: Adam R. <ada...@de...> - 2007-08-31 09:56:41
|
You will need to add an additional function to the Response module, if you send me a patch I will commit it to the codebase... Thanks Adam. On Thu, 2007-08-30 at 15:32 -0400, Andrzej Jan Taramina wrote: > I noticed that there are functions to set cookies and headers for HTTP > responses, but there doesn't seem to be a way to set the response code. > > When using XQuery to process HTTP requests, it would be nice to be able to > specify alternate return codes, like a 404 Bad Request, 405 Method Not > Allowed, 201 Created, etc. > > That way, you could use an XQuery to implement a REST-based application > interface. > > Any way of doing this, or will I have to extend the response module to > include a set-code() method? > > Thx! > > Andrzej Jan Taramina > Chaeron Corporation: Enterprise System Solutions > http://www.chaeron.com > -- Adam Retter Principal Developer Devon Portal Project Room 310 County Hall Topsham Road Exeter EX2 4QD t: 01392 38 3683 f: 01392 38 2966 e: ada...@de... w: www.devonline.gov.uk |