diff --git a/src/Http/HttpclientSwoole.php b/src/Http/HttpclientSwoole.php index 7f739a4..71f1c98 100644 --- a/src/Http/HttpclientSwoole.php +++ b/src/Http/HttpclientSwoole.php @@ -45,12 +45,12 @@ protected function request($url, $method = self::GET, $params = array(), $option $is_ssl = isset($paths['scheme']) && $paths['scheme'] == 'https'; $port = isset($paths['port']) ? $paths['port'] : ($is_ssl ? 443 : 80); - $ip = \Swoole\Coroutine::gethostbyname($host); - if ( !$ip ) { - \throw_error('Coroutine::gethostbyname("'. $host .'") host is empty', 19220); - } + // $ip = \Swoole\Coroutine::gethostbyname($host); + // if ( !$ip ) { + // \throw_error('Coroutine::gethostbyname("'. $host .'") host is empty', 19220); + // } - $cli = new \Swoole\Coroutine\Http\Client($ip, $port, $is_ssl); + $cli = new \Swoole\Coroutine\Http\Client($host, $port, $is_ssl); // 兼容httpclient的header头 $headers = ['Host' => $host];