Classes/Service/ClientService.php
protected function getCallableClient(string $domain): Client
    {
        if (!\class_exists(Client::class) || !\class_exists(CookieJar::class)) {
            throw new \Exception('You need guzzle to handle the Queue Management', 1236728342);
        }
        $jar = GeneralUtility::makeInstance(CookieJar::class);
        $cookie = GeneralUtility::makeInstance(SetCookie::class);
        $cookie->setName('staticfilecache');
        $cookie->setValue('1');
        $cookie->setPath('/');
        $cookie->setExpires((new DateTimeService())->getCurrentTime() + 3600);
        $cookie->setDomain($domain);
        $jar->setCookie($cookie);
        $options = [
            'cookies' => $jar,
            'allow_redirects' => [
                'max' => false,
            ],
            'headers' => [
                'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0',
            ],
        ];

        return GeneralUtility::makeInstance(Client::class, $options);
    }
protected function getCallableClient(string $domain): Client
    {
        if (!\class_exists(Client::class) || !\class_exists(CookieJar::class)) {
            throw new \Exception('You need guzzle to handle the Queue Management', 1236728342);
        }
        $jar = GeneralUtility::makeInstance(CookieJar::class);
        $cookie = GeneralUtility::makeInstance(SetCookie::class);
        $cookie->setName('staticfilecache');
        $cookie->setValue('1');
        $cookie->setPath('/');
        $cookie->setExpires((new DateTimeService())->getCurrentTime() + 3600);
        $cookie->setDomain($domain);
        $jar->setCookie($cookie);
        $options = [
            'cookies' => $jar,
            'allow_redirects' => [
                'max' => false,
            ],
            'headers' => [
                'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0',
            ],
        ];

        return GeneralUtility::makeInstance(Client::class, $options);
    }
protected function getCallableClient ( string $ domain ) : Client { if ( ! \ class_exists ( Client :: class ) || ! \ class_exists ( CookieJar :: class ) ) { throw new \ Exception ( 'You need guzzle to handle the Queue Management' , 1236728342 ) ; } $ jar = GeneralUtility :: makeInstance ( CookieJar :: class ) ; $ cookie = GeneralUtility :: makeInstance ( SetCookie :: class ) ; $ cookie -> setName ( 'staticfilecache' ) ; $ cookie -> setValue ( '1' ) ; $ cookie -> setPath ( '/' ) ; $ cookie -> setExpires ( ( new DateTimeService ( ) ) -> getCurrentTime ( ) + 3600 ) ; $ cookie -> setDomain ( $ domain ) ; $ jar -> setCookie ( $ cookie ) ; $ options = [ 'cookies' => $ jar , 'allow_redirects' => [ 'max' => false , ] , 'headers' => [ 'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0' , ] , ] ; return GeneralUtility :: makeInstance ( Client :: class , $ options ) ; }
Get a cllable client.

@param string $domain

@throws \Exception

@return Client
Get a cllable client .