wotpy.protocols.http.handlers.utils
Request handler for Property interactions.
Functions
|
Returns an argument extracted from the request. |
|
Utility function to retrieve an ExposedThing from the HTTPServer or raise an HTTPError. |
|
If authentication fails request authentication from the client with the correct scheme. |
- wotpy.protocols.http.handlers.utils.get_argument(req_handler, name, default=None)
Returns an argument extracted from the request. Interprets the body as JSON if the Content-Type is application/json. Reverts to the default Tornado get_argument otherwise.
- wotpy.protocols.http.handlers.utils.get_exposed_thing(server, title)
Utility function to retrieve an ExposedThing from the HTTPServer or raise an HTTPError.
- wotpy.protocols.http.handlers.utils.request_auth(req_handler, scheme, thing_name)
If authentication fails request authentication from the client with the correct scheme.