sends response object to client after handling