protected function buildGuzzleOptions($headers, $timeout)
    {
        $finalHeaders = [];

        foreach ($headers as $header) {
            list($name, $value) = explode(':', $header, 2);
            $finalHeaders[$name] = trim($value);
        }

        $options = ['headers' => $finalHeaders, 'timeout' => $timeout];
        if (!empty($this->username) && !empty($this->password)) {
            $options['auth'] = [$this->username, $this->password];
        }

        if ($this->extensionConfiguration->getIsSelfSignedCertificatesEnabled()) {
            $options['verify'] = false;
        }

        return $options;
    }
protected function buildGuzzleOptions($headers, $timeout)
    {
        $finalHeaders = [];

        foreach ($headers as $header) {
            list($name, $value) = explode(':', $header, 2);
            $finalHeaders[$name] = trim($value);
        }

        $options = ['headers' => $finalHeaders, 'timeout' => $timeout];
        if (!empty($this->username) && !empty($this->password)) {
            $options['auth'] = [$this->username, $this->password];
        }

        if ($this->extensionConfiguration->getIsSelfSignedCertificatesEnabled()) {
            $options['verify'] = false;
        }

        return $options;
    }
protected function buildGuzzleOptions ( $ headers , $ timeout ) { $ finalHeaders = [ ] ; foreach ( $ headers as $ header ) { list ( $ name , $ value ) = explode ( ':' , $ header , 2 ) ; $ finalHeaders [ $ name ] = trim ( $ value ) ; } $ options = [ 'headers' => $ finalHeaders , 'timeout' => $ timeout ] ; if ( ! empty ( $ this -> username ) && ! empty ( $ this -> password ) ) { $ options [ 'auth' ] = [ $ this -> username , $ this -> password ] ; } if ( $ this -> extensionConfiguration -> getIsSelfSignedCertificatesEnabled ( ) ) { $ options [ 'verify' ] = false ; } return $ options ; }
Build the options array for the guzzle client.

@param array $headers
@param float $timeout
@return array
Build the options array for the guzzle client .