curl_setopt($this->curlHandle, CURLOPT_RETURNTRANSFER, true); curl_setopt($this->curlHandle, CURLOPT_TIMEOUT, 2); curl_setopt($this->curlHandle, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($this->curlHandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_setopt($this->curlHandle, CURLOPT_ENCODING, ''); curl_setopt($this->curlHandle, CURLINFO_HEADER_OUT, true); curl_setopt($this->curlHandle, CURLOPT_FAILONERROR, true); if ($method === 'post') { curl_setopt($this->curlHandle, CURLOPT_POST, true); } return $this->curlHandle; } } curl_setopt($this->curlHandle, CURLOPT_RETURNTRANSFER, true); curl_setopt($this->curlHandle, CURLOPT_TIMEOUT, 2); curl_setopt($this->curlHandle, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($this->curlHandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_setopt($this->curlHandle, CURLOPT_ENCODING, ''); curl_setopt($this->curlHandle, CURLINFO_HEADER_OUT, true); curl_setopt($this->curlHandle, CURLOPT_FAILONERROR, true); if ($method === 'post') { curl_setopt($this->curlHandle, CURLOPT_POST, true); } return $this->curlHandle; } }