Open weicut opened 3 years ago
$saber = Swlib\Saber::create([ // 'base_uri' => 'http://localhost:9988', 'exception_report' => 0, 'use_pool' => 50 ]); $result = $saber->get('http://localhost:9988/', [ 'retry_time' => 3 ]);
如果 create 时不加 base_uri,会报如下错误:
为什么要这么用呢 0.0
因为感觉在 get 方法中做会更友好,同样也可以根据 url 分析出 uri,不用强绑在实例中,Guzzle HTTP 组件也是采用这样的做法哦
如果 create 时不加 base_uri,会报如下错误: