mcwebb / lambda-kernel

Minimal kernel to handle and provide structure to requests and responses for AWS Lambda and Serverless
MIT License
2 stars 0 forks source link

Allow different response formatting #1

Open mcwebb opened 7 years ago

mcwebb commented 7 years ago

Currently the Response class automatically renders body output as JSON, there should be a way to output other formats.

mcwebb commented 7 years ago

What's the best way of allowing this? Current ideas:

  1. Subclass the Response class for different body formatters
  2. Pass a formatter function/class to the render constructor
  3. Pass the formatter function/class into the dispatcher, which is then passed to the simplify() method when rendering.