kernel update

This commit is contained in:
2024-11-18 16:04:57 +03:00
parent 10605e17e7
commit 2af9ea876d
27 changed files with 434 additions and 91 deletions

View File

@ -0,0 +1,21 @@
<?php
namespace kernel\helpers;
use http\Client;
class RESTClient
{
public static function request(string $url, string $method = 'GET')
{
$client = new \GuzzleHttp\Client();
return $client->request($method, $url, [
'headers' => [
'Authorization' => 'Bearer ' . $_ENV['MODULE_SHOP_TOKEN']
]
]);
}
}