Skip to content

Instantly share code, notes, and snippets.

@wsantos
Created August 21, 2014 22:42
Show Gist options
  • Save wsantos/303c541cb18557702862 to your computer and use it in GitHub Desktop.
Save wsantos/303c541cb18557702862 to your computer and use it in GitHub Desktop.
Body processor.
class RequestHandler
@processed_body.setter
def processed_body(self, value):
self._processed_body = value
@property
def processed_body(self):
if not hasattr(self, "_processed_body"):
self._processed_body = self.get_processed_body()
return self._processed_body
def get_processed_body(self):
""""
Must be overriden to process the body
""""
return None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment