Skip to content

Commit 4e85593

Browse files
added delete type support in http adapter curl
1 parent 121fadd commit 4e85593

File tree

1 file changed

+4
-0
lines changed
  • lib/internal/Magento/Framework/HTTP/Adapter

1 file changed

+4
-0
lines changed

lib/internal/Magento/Framework/HTTP/Adapter/Curl.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,11 @@ public function write($method, $url, $http_ver = '1.1', $headers = [], $body = '
176176
} elseif ($method == \Zend_Http_Client::GET) {
177177
curl_setopt($this->_getResource(), CURLOPT_HTTPGET, true);
178178
curl_setopt($this->_getResource(), CURLOPT_CUSTOMREQUEST, 'GET');
179+
}elseif ($method == \Zend_Http_Client::DELETE) {
180+
curl_setopt($this->_getResource(), CURLOPT_CUSTOMREQUEST, "DELETE");
181+
curl_setopt($this->_getResource(), CURLOPT_POSTFIELDS, $body);
179182
}
183+
180184

181185
if ($http_ver === \Zend_Http_Client::HTTP_1) {
182186
curl_setopt($this->_getResource(), CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);

0 commit comments

Comments
 (0)