Registry / http-client / wyrihaximus-react-guzzle-psr7

wyrihaximus-react-guzzle-psr7

JSON →
library2.1.3phppackagistunverified

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

composer require wyrihaximus/react-guzzle-psr7
INSTALL
IMPORT
SIG · WYRIHAXIMUS-REACT-
W
wyrihaximus-react-guzzle-psr7
http-clientphpv2.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HttpClient
use WyriHaximus\React\Guzzle\HttpClient;

Send an asynchronous GET request using ReactPHP.

use WyriHaximus\React\Guzzle\HttpClient; $client = new HttpClient(); $promise = $client->getAsync('https://api.example.com/data'); $promise->then(function ($response) { echo $response->getBody(); });
Debug
Known issues
gotchaRequires ReactPHP event loop to be running; otherwise promises won't resolve.
fix
Ensure you have a running event loop, e.g., (new React\EventLoop\Loop())->run().
affects: >=2.0.0
Upgrade
Version history
2.1.3latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
54 hits · last 30 days
node
48
Resources
wyrihaximus-react-guzzle-psr7 — pip install wyrihaximus-react-guzzle-psr7 · libregistry