2017 © Pedro Peláez
 

library react-guzzle-psr7

Asyncronous Guzzle (PSR7) adapter powered by react/http-client

image

wyrihaximus/react-guzzle-psr7

Asyncronous Guzzle (PSR7) adapter powered by react/http-client

  • Monday, July 23, 2018
  • by WyriHaximus
  • Repository
  • 3 Watchers
  • 60 Stars
  • 22,691 Installations
  • PHP
  • 15 Dependents
  • 0 Suggesters
  • 7 Forks
  • 1 Open issues
  • 10 Versions
  • 9 % Grown

The README.md

react-guzzle-psr7

Build Status Latest Stable Version Total Downloads Coverage Status License, (*1)

ReactPHP HttpClient Adapter for Guzzle6, for Guzzle5 check ReactGuzzleRing, (*2)

Installation

To install via Composer, use the command below, it will automatically detect the latest version and bind it with ~., (*3)

composer require wyrihaximus/react-guzzle-psr7 

Examples

Asynchronous

<?php

require 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

$loop = \React\EventLoop\Factory::create();
$handler = new \WyriHaximus\React\GuzzlePsr7\HttpClientAdapter($loop);

$client = new \GuzzleHttp\Client([
    'handler' => \GuzzleHttp\HandlerStack::create($handler),
]);

$client->getAsync('http://github.com/')->then(function ($response) {
    var_export($response);
    var_export((string) $response->getBody());
});

$client->getAsync('http://php.net/')->then(function ($response) {
    var_export($response);
    var_export((string) $response->getBody());
});

$loop->run();

Synchronous

<?php

require 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

$loop = \React\EventLoop\Factory::create();
$handler = new \WyriHaximus\React\GuzzlePsr7\HttpClientAdapter($loop);

$client = new \GuzzleHttp\Client([
    'handler' => \GuzzleHttp\HandlerStack::create($handler),
]);

var_export((string) $client->get('http://github.com/')->getBody());

See the examples directory for more ways to use this handler., (*4)

Contributing

Please see CONTRIBUTING for details., (*5)

License

Copyright 2015 Cees-Jan Kiewiet, (*6)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:, (*7)

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software., (*8)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE., (*9)

The Versions

23/07 2018

dev-master

9999999-dev

Asyncronous Guzzle (PSR7) adapter powered by react/http-client

  Sources   Download

MIT

The Requires

 

The Development Requires

23/07 2018

2.1.0

2.1.0.0

Asyncronous Guzzle (PSR7) adapter powered by react/http-client

  Sources   Download

MIT

The Requires

 

The Development Requires

23/07 2018

dev-http_errors-28

dev-http_errors-28

Asyncronous Guzzle (PSR7) adapter powered by react/http-client

  Sources   Download

MIT

The Requires

 

The Development Requires

23/04 2018

2.0.2

2.0.2.0

Asyncronous Guzzle (PSR7) adapter powered by react/http-client

  Sources   Download

MIT

The Requires

 

The Development Requires

21/04 2018

dev-event-loop-0.5

dev-event-loop-0.5

Asyncronous Guzzle (PSR7) adapter powered by react/http-client

  Sources   Download

MIT

The Requires

 

The Development Requires

29/09 2017

dev-tick-queue

dev-tick-queue

Asyncronous Guzzle (PSR7) adapter powered by react/http-client

  Sources   Download

MIT

The Requires

 

The Development Requires

22/09 2017

2.0.1

2.0.1.0

Asyncronous Guzzle (PSR7) adapter powered by react/http-client

  Sources   Download

MIT

The Requires

 

The Development Requires

22/09 2017

dev-work-with-both-react-http-client-0.4-and-0.5

dev-work-with-both-react-http-client-0.4-and-0.5

Asyncronous Guzzle (PSR7) adapter powered by react/http-client

  Sources   Download

MIT

The Requires

 

The Development Requires

30/03 2017

2.0.0

2.0.0.0

Asyncronous Guzzle (PSR7) adapter powered by react/http-client

  Sources   Download

MIT

The Requires

 

The Development Requires