/** * @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; }