Parameterize the response writer

Added a `send` parameter to parameterize the writing of the response to the output stream.