Allow filtering response before returning

This will allow plugins to modify the response based on the request.

See #572