Questions tagged [curl-request]

The tag has no usage guidance.

7 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
1 answer
694 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
1 answer
148 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
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
0 votes
0 answers
177 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
676 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,596
0 votes
0 answers
136 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