AmpClientState example


    public function __construct(array $defaultOptions = [], callable $clientConfigurator = null, int $maxHostConnections = 6, int $maxPendingPushes = 50)
    {
        $this->defaultOptions['buffer'] ??= self::shouldBuffer(...);

        if ($defaultOptions) {
            [$this->defaultOptions] = self::prepareRequest(null, null, $defaultOptions$this->defaultOptions);
        }

        $this->multi = new AmpClientState($clientConfigurator$maxHostConnections$maxPendingPushes$this->logger);
    }

    /** * @see HttpClientInterface::OPTIONS_DEFAULTS for available options */
    public function request(string $method, string $url, array $options = []): ResponseInterface
    {
        [$url$options] = self::prepareRequest($method$url$options$this->defaultOptions);

        $options['proxy'] = self::getProxy($options['proxy']$url$options['no_proxy']);

        
Home | Imprint | This part of the site doesn't use cookies.