Setting response values accordingly at the end of the request.