Questions tagged [curl-request]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
162 views

Error in cURL request: Magento 2 error on admin panel

i need urgent help, i am getting curl request error when i go to Stores->configuration in magento admin panel. I am using magenot 2.4 Please can anyone advice what i can do to resolve this? https://...
Nicola Smith's user avatar
0 votes
2 answers
1k views

Magento 2 How to turn off SSL check on sending CURL request to the external API?

I am working on a module that will send CURL requests to the external APIs of a CRM. I am getting an error in my exception log like main.CRITICAL: Error Curl {"exception":"[object] (...
Hybrid Developer's user avatar
0 votes
1 answer
622 views

How to handle if curl request throws error in magento 2

I am receiving a response from using a curl request. But how do I check whether my curl request throws an error or not? because it takes 15 minutes to give a response from API.(but it works fine while ...
Jaisa's user avatar
  • 2,556
0 votes
1 answer
260 views

Requesting controller action via Curl request

I am sending a CURL request to a controller action and construct() function is working (called) but it doesn't call the execute() function of the controller. For now, I am calling the execute() ...
Anush Starlit's user avatar
1 vote
1 answer
834 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 ...
Elavarasan's user avatar
1 vote
1 answer
147 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($...
Ben's user avatar
  • 11
0 votes
0 answers
134 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-...
satya's user avatar
  • 253
1 vote
3 answers
2k 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, ...
Rama Chandran M's user avatar
4 votes
2 answers
12k 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( ...
Nitin Pawar's user avatar
  • 1,526
1 vote
2 answers
1k 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. ...
Blackpanther0001's user avatar
2 votes
1 answer
1k 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 ...
Goose84's user avatar
  • 2,559
4 votes
1 answer
660 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 ...
Idham Choudry's user avatar
1 vote
2 answers
2k 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 ...
Ramkishan Suthar's user avatar