cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to find PUT and Delete method in curl Magento/Framework/HTTP/Client/Curl.php

SOLVED

Unable to find PUT and Delete method in curl Magento/Framework/HTTP/Client/Curl.php

Please provide me any solution to call makeRequest() protected function in controller without using extends in class.

File path : - Magento/Framework/HTTP/Client/Curl.php

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Unable to find PUT and Delete method in curl Magento/Framework/HTTP/Client/Curl.php

Hi there, 

We believe it's impossible to accomplish it without extending the class.  

If you need the `PUT` method, you can use a method from the 'write' class.  `\Magento\Framework\HTTP\Adapter\Curl` class. But we'd recommend using the class `\Magento\Framework\HTTP\ZendClient`, which supports all this (see the method - `Zend_Http_Client::request($method)`), as Zend Client tries to apply 'Curl' adapter at requests at the first place (if it is possible).

 

---------------------------------------------------------

If you've found one of our answers useful, please give 'Kudos' or 'Accept as Solution'.

View solution in original post

1 REPLY 1

Re: Unable to find PUT and Delete method in curl Magento/Framework/HTTP/Client/Curl.php

Hi there, 

We believe it's impossible to accomplish it without extending the class.  

If you need the `PUT` method, you can use a method from the 'write' class.  `\Magento\Framework\HTTP\Adapter\Curl` class. But we'd recommend using the class `\Magento\Framework\HTTP\ZendClient`, which supports all this (see the method - `Zend_Http_Client::request($method)`), as Zend Client tries to apply 'Curl' adapter at requests at the first place (if it is possible).

 

---------------------------------------------------------

If you've found one of our answers useful, please give 'Kudos' or 'Accept as Solution'.