Example #1
0
File: Curl.php Project: brick/brick
 /**
  * @return string
  *
  * @throws CurlException
  */
 public function execute()
 {
     // This must always be set.
     $this->setOption(CURLOPT_RETURNTRANSFER, true);
     $result = curl_exec($this->curl);
     if ($result === false) {
         throw CurlException::error(curl_error($this->curl));
     }
     return $result;
 }