diff --git a/src/Bigcommerce/Api/Connection.php b/src/Bigcommerce/Api/Connection.php index b84e0618..ec50e335 100644 --- a/src/Bigcommerce/Api/Connection.php +++ b/src/Bigcommerce/Api/Connection.php @@ -365,6 +365,8 @@ public function get($url, $query = false) curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($this->curl, CURLOPT_URL, $url); + curl_setopt($this->curl, CURLOPT_POST, false); + curl_setopt($this->curl, CURLOPT_PUT, false); curl_setopt($this->curl, CURLOPT_HTTPGET, true); curl_exec($this->curl); @@ -392,6 +394,8 @@ public function post($url, $body) curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'POST'); curl_setopt($this->curl, CURLOPT_URL, $url); curl_setopt($this->curl, CURLOPT_POST, true); + curl_setopt($this->curl, CURLOPT_PUT, false); + curl_setopt($this->curl, CURLOPT_HTTPGET, false); curl_setopt($this->curl, CURLOPT_POSTFIELDS, $body); curl_exec($this->curl); @@ -444,6 +448,8 @@ public function put($url, $body) curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT'); curl_setopt($this->curl, CURLOPT_URL, $url); + curl_setopt($this->curl, CURLOPT_HTTPGET, false); + curl_setopt($this->curl, CURLOPT_POST, false); curl_setopt($this->curl, CURLOPT_PUT, true); curl_exec($this->curl); @@ -463,6 +469,9 @@ public function delete($url) { $this->initializeRequest(); + curl_setopt($this->curl, CURLOPT_PUT, false); + curl_setopt($this->curl, CURLOPT_HTTPGET, false); + curl_setopt($this->curl, CURLOPT_POST, false); curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'DELETE'); curl_setopt($this->curl, CURLOPT_URL, $url); curl_exec($this->curl);