public function sendContent(Response $response)
 {
     //clear the exiting content
     while (@ob_end_clean()) {
     }
     if ($response->getGzip()) {
         $output = gzcompress($response->getContent());
     } else {
         $output = $response->getContent();
     }
     echo $output;
     exit;
 }