mirror of
https://github.com/opdavies/glassboxx-sdk-php.git
synced 2025-02-17 22:50:48 +00:00
29 lines
650 B
PHP
29 lines
650 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Opdavies\Glassboxx\Request;
|
|
|
|
use Opdavies\Glassboxx\Config;
|
|
use Opdavies\Glassboxx\Traits\UsesConfigTrait;
|
|
use Symfony\Component\HttpClient\HttpClient;
|
|
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
|
|
|
abstract class AbstractRequest
|
|
{
|
|
use UsesConfigTrait;
|
|
|
|
public const BASE_URL = 'https://server.glassboxx.co.uk';
|
|
|
|
/** @var HttpClientInterface */
|
|
protected $client;
|
|
|
|
public function __construct(HttpClientInterface $client = null)
|
|
{
|
|
if (!$client) {
|
|
$client = HttpClient::createForBaseUri(self::BASE_URL);
|
|
}
|
|
|
|
$this->client = $client;
|
|
}
|
|
}
|