update modules from ms
This commit is contained in:
21
kernel/helpers/RESTClient.php
Normal file
21
kernel/helpers/RESTClient.php
Normal 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']
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user