class documentation

Base class for handling HTTP server requests.

Users of this class must subclass it and override the HandleRequest function.

Static Method FormatErrorMessage Formats the body of an error message.
Method HandleRequest Handles a request.
Method PreHandleRequest Called before handling a request.
@staticmethod
def FormatErrorMessage(values):

Formats the body of an error message.

Parameters
values:dictdictionary with keys code, message and explain.
Returns
tuple; (string, string)Content-type and response body
def HandleRequest(self, req):

Handles a request.

Must be overridden by subclass.

def PreHandleRequest(self, req):

Called before handling a request.

Can be overridden by a subclass.