vendor/shopware/core/Framework/Update/Services/UpdateApiHttpClientFactory.php line 32

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Framework\Update\Services;
  3. use GuzzleHttp\Client;
  4. use Shopware\Core\Framework\Log\Package;
  5. use Shopware\Core\System\SystemConfig\SystemConfigService;
  6. #[Package('system-settings')]
  7. class UpdateApiHttpClientFactory
  8. {
  9.     private SystemConfigService $systemConfigService;
  10.     /**
  11.      * @internal
  12.      */
  13.     public function __construct(SystemConfigService $systemConfigService)
  14.     {
  15.         $this->systemConfigService $systemConfigService;
  16.     }
  17.     public function __invoke(): Client
  18.     {
  19.         $config = [
  20.             'base_uri' => $this->systemConfigService->get('core.update.apiUri'),
  21.             'headers' => [
  22.                 'Content-Type' => 'application/json',
  23.                 'ACCEPT' => 'application/json',
  24.             ],
  25.         ];
  26.         return new Client($config);
  27.     }
  28. }