Wrapper for setting and sending responses to client