Questions tagged [curl-request]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
19 views

Error in Curl request with response in Controller

I'm trying to get curl response from js (cc-method.js) file. The curl call code is in controller file domain.com/frontname/section/index. Below is the code, public function execute() { // create ...
1
vote
1answer
40 views

How to write this Curl code to Magento 2 code?

I am calling third party API using below methods: public function setCredentials($data) { $curl = curl_init('https://example_url.com/'); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($...
0
votes
0answers
65 views

Could not Add customer address using customer id using Magento-2 REST API

I am facing one issue while adding new address of a existing customer using its id. I am explaining my code below. <?php include('db.php'); $response=array(); $adminUrl='http://magento-148486-...
1
vote
1answer
456 views

How to write Curl code to Magento 2 code

This is my curl code. How to write the same in Magento 2 $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, ...
2
votes
2answers
5k views

magento 2 : How to use curl? [duplicate]

I am trying to to create the curl request but it is not working. It is giving the error Uncaught Error: Class 'Custom\Rma\Helper\Varien_Http_Adapter_Curl' not found Code $header = array( ...
0
votes
1answer
466 views

Magento 2 Rest Api call curl SSL Error

I have setup a custom Magento Rest Api at the endpoint: "https://domain-name.de/rest/V1/wawi". This Api just returns a simple json string. Have tested my Api with Postman application -> works fine. ...
2
votes
1answer
551 views

cURL with Magento 2

I need to make cURL requests within my Magento 2 instance to an external source. As far as I can see there are 3 options Use native PHP Use Magento\Framework\HTTP\Adapter\Curl which uses Zend Use ...
4
votes
0answers
255 views

Add CURLOPT_HTTPHEADER to Magento 2 curl

Currently i'm using magento 2 curl framework to connect to rest api like this: public function __construct(\Magento\Framework\HTTP\Client\Curl $curl ) { $this->_curl = $curl; } private ...
0
votes
1answer
729 views

CURL request using DELETE method in Magento 2

I am trying to call a curl request for delete method using Magento\Framework\HTTP\Client\Curl.php. In this class makeRequest method is responsible for sending curl request. But as I can see that ...