2

I have cron set up which will run to import the data using the curl. I want to use curl using magento's way

1 Answer 1

4
 <?php /** * Copyright © All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Vendor\Module\Cron; class GetData { protected $curl; public function __construct( \Magento\Framework\HTTP\Client\Curl $curl ) { $this->curl = $curl; } public funnction execute() { $this->curl->post($url, $params); $result = $this->curl->getBody(); } } 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.