NativeClientState example


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

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

        $this->multi = new NativeClientState();
        $this->multi->maxHostConnections = 0 < $maxHostConnections ? $maxHostConnections : \PHP_INT_MAX;
    }

    /** * @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);

        if ($options['bindto']) {
            
Home | Imprint | This part of the site doesn't use cookies.