wotpy.protocols.http.handlers.utils

Request handler for Property interactions.

Functions

get_argument(req_handler, name[, default]) Returns an argument extracted from the request.
get_exposed_thing(server, thing_name) Utility function to retrieve an ExposedThing from the HTTPServer or raise an HTTPError.
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, thing_name)

Utility function to retrieve an ExposedThing from the HTTPServer or raise an HTTPError.