I want to create function which will execute other url (this url generate file on server) and get responce and then send message to user, but I want not to use ajax, I try to user Reqeust object but it don't work.
public function testCreateFile() {
$uri = 'http://someuri/somefuncition';
$method = 'POST';
$paramaters = array(
'csv' => '20190102212655-product-test.csv',
'type' => '5',
);
$request = new Request();
$request->create($uri,$method,$paramaters);
return new Response("Message to user") ;
}
How I should do coreectly?
Thanks for help in advance.