Mercurial > p > roundup > code
comparison roundup/cgi/client.py @ 5568:edab9daa8015 REST-rebased
Make objects returned by REST follow the standard
Making objects returned by REST follow the standard (wrapped by a
dictionary, in either 'data' or 'error' field)
Temporally added the client to REST so REST can make changes to HTTP
Status code and Header
committer: Ralf Schlatterbeck <rsc@runtux.com>
| author | Chau Nguyen <dangchau1991@yahoo.com> |
|---|---|
| date | Wed, 30 Jan 2019 10:26:34 +0100 |
| parents | 70df783c4c0b |
| children | 79da1ca2f94b |
comparison
equal
deleted
inserted
replaced
| 5567:1af57f9d5bf7 | 5568:edab9daa8015 |
|---|---|
| 495 # TODO: add everything to RestfulDispatcher | 495 # TODO: add everything to RestfulDispatcher |
| 496 self.determine_user() | 496 self.determine_user() |
| 497 self.check_anonymous_access() | 497 self.check_anonymous_access() |
| 498 | 498 |
| 499 # Call rest library to handle the request | 499 # Call rest library to handle the request |
| 500 handler = rest.RestfulInstance(self.db) | 500 handler = rest.RestfulInstance(self, self.db) |
| 501 output = handler.dispatch(self.env['REQUEST_METHOD'], self.path, | 501 output = handler.dispatch(self.env['REQUEST_METHOD'], self.path, |
| 502 self.form) | 502 self.form) |
| 503 | 503 |
| 504 # self.setHeader("Content-Type", "text/xml") | 504 # self.setHeader("Content-Type", "text/xml") |
| 505 self.setHeader("Content-Length", str(len(output))) | 505 self.setHeader("Content-Length", str(len(output))) |
