private function resolveConfig(array $config)
    {
        if (!isset($config['httpHandler'])) {
            $config['httpHandler'] = HttpHandlerFactory::build();
        }

        if (!isset($config['asyncHttpHandler'])) {
            $isGuzzleHandler = $config['httpHandler'] instanceof Guzzle6HttpHandler
                || $config['httpHandler'] instanceof Guzzle5HttpHandler;
            $config['asyncHttpHandler'] = $isGuzzleHandler
                ? [$config['httpHandler'], 'async']
                : [HttpHandlerFactory::build(), 'async'];
        }

        return array_merge($this->config, $config);
    }