2017 © Pedro Peláez
 

library guzzle-mutable-config

Guzzle Client with a mutable config

image

a3020/guzzle-mutable-config

Guzzle Client with a mutable config

  • Monday, October 3, 2016
  • by a3020
  • Repository
  • 1 Watchers
  • 0 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Guzzle, PHP HTTP client with mutable config

The Guzzle configuration is immutable by default. It can only be set via the constructor and retrieved via getConfig., (*1)

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:, (*2)

  • setConfig(array $array)
  • setConfigOption(string $key, $value)

Installation

composer require "a3020/guzzle-mutable-config", (*3)

Usage

$client = new A3020\GuzzleHttp\Client([
    'base_uri' => 'foo',
]);
$client->setConfigOption('base_uri', 'http://localhost');
$response = $client->get('file.htm');

The Versions

03/10 2016

dev-master

9999999-dev

Guzzle Client with a mutable config

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar a3020

03/10 2016

0.1.3

0.1.3.0

Guzzle Client with a mutable config

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar a3020

24/09 2016

0.1.2

0.1.2.0

Guzzle Client with a mutable config

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar a3020

21/09 2016

0.1.1

0.1.1.0

Guzzle Client with a mutable config

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar a3020

16/09 2016

0.1

0.1.0.0

Guzzle Client with a mutable config

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar a3020