Request handler

class supercell.api.requesthandler.RequestHandler(application, request, **kwargs)[source]

supercell request handler.

The only difference to the tornado.web.RequestHandler is an adopted RequestHandler._execute_method() method that will handle the consuming and providing of request inputs and results.

config[source]

Convinience method for accessing the environment.

decode_argument(value, name=None)[source]

Overwrite the default RequestHandler.decode_argument() method in order to allow latin1 encoded URLs.

environment[source]

Convinience method for accessing the environment.

logger[source]

Use this property to write to the log files.

In a request handler you would simply log messages like this:

def get(self):
    self.logger.info('A test')
request_id[source]

Return a unique id per request. Collisions are allowed but should should not occur within a 10 minutes time window.

The current implementation is based on a timestamp in milliseconds substracted by a large number to make the id smaller.

Read the Docs v: v0.4.0
Versions
latest
v0.4.0
v0.3.0
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.