original_string: public function request($url)
      {
          $curlOpts = array_replace($this->curlOpts, [CURLOPT_URL => $url]);
  
          $ch = curl_init();
          foreach ($curlOpts as $opt => $optVal) {
              curl_setopt($ch, $opt, $optVal);
          }
  
          $resp = curl_exec($ch);
          $info = (object) curl_getinfo($ch);
          curl_close($ch);
  
          //Check response
          $httpCode = (string) $info->http_code;
          if ($httpCode{0} != '2') {
              $msg = sprintf('HTTP Request Failed (code %s): %s', $info->http_code, $resp);
              throw new HttpException($resp, $msg, $httpCode);
          } elseif (strlen(trim($resp)) == 0) {
              throw new HttpException($resp, 'HTTP Response Empty');
          }
  
          return $resp;
      }
code: public function request($url)
      {
          $curlOpts = array_replace($this->curlOpts, [CURLOPT_URL => $url]);
  
          $ch = curl_init();
          foreach ($curlOpts as $opt => $optVal) {
              curl_setopt($ch, $opt, $optVal);
          }
  
          $resp = curl_exec($ch);
          $info = (object) curl_getinfo($ch);
          curl_close($ch);
  
          //Check response
          $httpCode = (string) $info->http_code;
          if ($httpCode{0} != '2') {
              $msg = sprintf('HTTP Request Failed (code %s): %s', $info->http_code, $resp);
              throw new HttpException($resp, $msg, $httpCode);
          } elseif (strlen(trim($resp)) == 0) {
              throw new HttpException($resp, 'HTTP Response Empty');
          }
  
          return $resp;
      }
code_tokens: public function request ( $ url ) { $ curlOpts = array_replace ( $ this -> curlOpts , [ CURLOPT_URL => $ url ] ) ; $ ch = curl_init ( ) ; foreach ( $ curlOpts as $ opt => $ optVal ) { curl_setopt ( $ ch , $ opt , $ optVal ) ; } $ resp = curl_exec ( $ ch ) ; $ info = ( object ) curl_getinfo ( $ ch ) ; curl_close ( $ ch ) ; //Check response $ httpCode = ( string ) $ info -> http_code ; if ( $ httpCode { 0 } != '2' ) { $ msg = sprintf ( 'HTTP Request Failed (code %s): %s' , $ info -> http_code , $ resp ) ; throw new HttpException ( $ resp , $ msg , $ httpCode ) ; } elseif ( strlen ( trim ( $ resp ) ) == 0 ) { throw new HttpException ( $ resp , 'HTTP Response Empty' ) ; } return $ resp ; }
docstring: Do CURL Request
  
  @param  string $url The full URL
  @return string The response body
docstring_tokens: Do CURL Request