a3020/guzzle-mutable-config
Composer 安装命令:
composer require a3020/guzzle-mutable-config
包简介
Guzzle Client with a mutable config
README 文档
README
The Guzzle configuration is immutable by default. It can only be set via the constructor and retrieved via getConfig.
In case you need to for example crawl different domains, you may want to change the base_uri instead of creating hundreds of instances. This is a copy of the Guzzle Client implementation with two additional methods:
setConfig(array $array)setConfigOption(string $key, $value)
Installation
composer require "a3020/guzzle-mutable-config"
Usage
$client = new A3020\GuzzleHttp\Client([ 'base_uri' => 'foo', ]); $client->setConfigOption('base_uri', 'http://localhost'); $response = $client->get('file.htm');
统计信息
- 总下载量: 46
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-16