Skip to content

Commit 76863b2

Browse files
committed
MAGETWO-62831: Create Guarantee cancel service
- Added PUT method to HTTP client - Covered guarantee canceling service by unit test
1 parent 1dc4a22 commit 76863b2

File tree

1 file changed

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

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ public function write($method, $url, $http_ver = '1.1', $headers = [], $body = '
178178
curl_setopt($this->_getResource(), CURLOPT_POSTFIELDS, $body);
179179
} elseif ($method == \Zend_Http_Client::GET) {
180180
curl_setopt($this->_getResource(), CURLOPT_HTTPGET, true);
181+
} elseif ($method == \Zend_Http_Client::PUT) {
182+
curl_setopt($this->_getResource(), CURLOPT_CUSTOMREQUEST, \Zend_Http_Client::PUT);
183+
curl_setopt($this->_getResource(), CURLOPT_POSTFIELDS, $body);
181184
}
182185

183186
if (is_array($headers)) {

0 commit comments

Comments
 (0)