Yurunsoft / Guzzle-Swoole

让基于 Guzzle 的项目完美无缝兼容 Swoole 协程,支持:Guzzle、Elasticsearch client——来自宇润 PHP 全家桶
MIT License
161 stars 21 forks source link

proxy 使用字符串形式设置无效 #7

Closed dickens7 closed 5 years ago

dickens7 commented 5 years ago

如下设置 proxy 无效

$client->request('GET', '/', ['proxy' => 'http://localhost:8125']);

以数组的形式设置代理可以正常生效

$client->request('GET', '/', [
    'proxy' => [
        'http'  => 'tcp://localhost:8125', // Use this proxy with "http"
        'https' => 'tcp://localhost:9124', // Use this proxy with "https",
        'no' => ['.mit.edu', 'foo.com']    // Don't use a proxy with these
    ]
]);
Yurunsoft commented 5 years ago

已修复,请使用最新版试一下