Replace the internal http client

@param HttpClient $client
558543
public function setHttpClient(HttpClient $client)
    {
        $this->httpClient = $client;

        $this->httpClient->setDefaultOption(
            'headers/Authorization',
            $this->getAuthorizationHeader()
        );
        $this->httpClient->setDefaultOption(
            'headers/Accepts',
            'application/json'
        );

        $this->bootModules();
    }
596007
protected function createClient($client)
    {
        try {
            new \ReflectionClass($client);
        } catch (\ReflectionException $e) {
            throw new FoundationException(sprintf("Could not load class '%s'.", $client), null, $e);
        }

        $client_instance = new $client();

        return $client_instance;
    }
885884
public function setClient(\Yurun\Swoole\SharedMemory\Client\Client $client)
    {
        $this->client = $client;

        return $this;
    }
950691
private static function setClient()
    {
        if (self::$client === null) {
            self::$client = new Client([
                'base_uri'  => self::$environment,
                'timeout'   => self::TIMEOUT,
                'verify'    => self::VERIFY,
            ]);
        }
    }
692976
public function remove(Client $client)
    {
        $clientId = $client->getId();
        if (!isset($this->clients[$clientId])) {
            return $this;
        }

        $requestId = $client->getRequest();
        $this->removeClientForRequest($clientId, $requestId);
        unset($this->clients[$clientId]);

        return $this;
    }
197039
public static function fromWeb($url, HttpClient $http = null)
    {
        $http = $http ?: new HttpClient();

        $request = $http->get($url);

        if (!$request->success) {
            throw new \RuntimeException(sprintf('The URL "%s" could not be loaded.', $url));
        }

        return new static($request->data);
    }
938597
public function setClient(ClientInterface $client)
    {
        parent::setClient($client);
        foreach ($this->plugins as $plugin) {
            if (!($plugin instanceof ClientAwareInterface)) {
                continue;
            }

            $plugin->setClient($client);
        }
    }
559008
public function client($client = null)
    {
        if (!func_num_args()) {
            return $this->_client;
        }
        $this->_client = $client;
        return $this;
    }
1055797
public function setHttpClient($client,
        $applicationId = 'MyCompany-MyApp-1.0')
    {
        if ($client === null) {
            $client = new Zend_Http_Client();
        }
        if (!$client instanceof Zend_Http_Client) {
            require_once 'Zend/Gdata/App/HttpException.php';
            throw new Zend_Gdata_App_HttpException(
                'Argument is not an instance of Zend_Http_Client.');
        }
        $userAgent = $applicationId . ' Zend_Framework_Gdata/' .
            Zend_Version::VERSION;
        $client->setHeaders('User-Agent', $userAgent);
        $client->setConfig(array(
            'strictredirects' => true
            )
        );
        $this->_httpClient = $client;
        self::setStaticHttpClient($client);
        return $this;
    }
981577
public function reset(): ApiClient
    {
        $this->internalRequest = new InternalRequest($this->baseUrl, 'GET');
        $this->request = null;
	$this->response = null;

        $this->profiler = false;

        $this->hasPerformedRequest = false;
        $this->kernel->shutdown();
        $this->kernel->boot();

        return $this;
    }
1309011
public function handleRequest(IHttpClient $request)
    {
        $wrapAccessToken = $this->_wrapTokenManager->getAccessToken(
            $request->getUrl()
        );

        $authorization = sprintf(
            Resources::WRAP_AUTHORIZATION,
            $wrapAccessToken
        );

        $request->setHeader(Resources::AUTHENTICATION, $authorization);

        return $request;
    }
401812
public function changeClientPassword($client, $password)
    {
        return $this->api->changeClientPassword($this->getClientId($client), $password);
    }
412903
public function update(Client $client)
    {
        $this->getEntityManager()->persist($client);
        $this->getEntityManager()->flush();
    }
1095305
public function setAgiClient(IClient $client)
    {
        $this->client = $client;
        $this->logger = $this->client->getAsteriskLogger();
        return $this;
    }
983185
@SuppressWarnings("unused")
  public synchronized void setDefaultHttpClient(CloseableHttpClient httpClient) {
    Objects.requireNonNull(httpClient);
    close();
    HttpExecutorFactory.httpClient = httpClient;
  }
376574
protected function setToken(Client $client)
    {
        $token = getenv('BOWERPHP_TOKEN');
        if (!empty($token)) {
            $client->authenticate($token, null, Client::AUTH_HTTP_TOKEN);
        }
    }
1296215
public function appendHeadersTo(ClientContract $client): void
    {
        $this->authenticator->authenticate($client);

        $client->withHeader('Cookie', $this->authenticator->token());
    }