main entry point for
a handler subclass is a method named after the HTTP method being handled: get(), post(), etc. Each handler may
define one or more of these methods to handle different HTTP actions. As write('')
def post(self):
self.set_header("Content-Type", "text/plain") request.body)
else:
self.json_args = None
Overriding RequestHandler methods
In addition to get()/post()/etc, certain other methods in RequestHandler are designed to be overridden by sub-
classes when
0 码力 |
272 页 |
1.12 MB
| 2 月前 3