PHPackages                             shuchkin/react-http-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. shuchkin/react-http-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

shuchkin/react-http-client
==========================

ReactPHP async HTTP client, minimal dependencies

0.2(6y ago)81.3k2MITPHPPHP &gt;=5.3.0

Since Aug 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/shuchkin/react-http-client)[ Packagist](https://packagist.org/packages/shuchkin/react-http-client)[ Docs](https://github.com/shuchkin/react-http-client)[ RSS](/packages/shuchkin-react-http-client/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

react-http-client 0.2
=====================

[](#react-http-client-02)

[![](https://camo.githubusercontent.com/624e7e5c37b5b5c0d1a065a9da3b270340d9c9daf192c8b127bae93e794773cc/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e742e7376673f75726c3d6874747073253341253246253246736869656c6473696f2d70617472656f6e2e6865726f6b756170702e636f6d25324673687563686b696e)](https://www.patreon.com/shuchkin)

ReactPHP async HTTP client, minimal dependencies:

Basic Usage
-----------

[](#basic-usage)

```
$loop = \React\EventLoop\Factory::create();
$http = new \Shuchkin\ReactHTTP\Client( $loop );

$http->get( 'http://api.ipify.org' )->then(
	function( $content ) {
		echo $content; // 123.45.67.8
	}
);

$loop->run();
```

Post
----

[](#post)

```
$loop = \React\EventLoop\Factory::create();

$http = new \Shuchkin\ReactHTTP\Client( $loop );

$http->post( 'https://reqres.in/api/users', '{"name": "morpheus","job": "leader"}' )->then(
	function ( $content ) {
		echo $content;
	},
	function ( \Exception $ex ) {
		echo 'HTTP error '.$ex->getCode().' '.$ex->getMessage();
	}
);

$loop->run();

// {"name":"morpheus","job":"leader","id":"554","createdAt":"2018-12-17T10:31:29.469Z"}
```

Send headers
------------

[](#send-headers)

```
$loop = \React\EventLoop\Factory::create();
$http = new \Shuchkin\ReactHTTP\Client( $loop );

$http->get('https://jigsaw.w3.org/HTTP/TE/foo.txt',['User-Agent' => 'ReactPHP Awesome'] )->then(
	function ( $content ) {
		echo $content;
	},
	function ( \Exception $ex ) {
		echo 'HTTP error '.$ex->getCode().' '.$ex->getMessage();
	}
);
$loop->run();
```

Read chunks
-----------

[](#read-chunks)

```
$loop = \React\EventLoop\Factory::create();

$http = new \Shuchkin\ReactHTTP\Client( $loop );
$http->get( 'https://jigsaw.w3.org/HTTP/ChunkedScript' )->then(
	function () {
		echo PHP_EOL . 'Mission complete';
	},
	function ( \Exception $ex ) {
		echo 'ERROR '.$ex->getCode().' '.$ex->getMessage();
	}
);

$http->on('chunk', function( $chunk ) {
	echo PHP_EOL.'-- CHUNK='.$chunk;
});

$loop->run();
```

Get headers &amp; debug
-----------------------

[](#get-headers--debug)

```
$loop = \React\EventLoop\Factory::create();

$http = new \Shuchkin\ReactHTTP\Client( $loop );

$http->request('GET','https://reqres.in/api/users')->then(
	function( \Shuchkin\ReactHTTP\Client $client ) {
		// dump response headers
		print_r( $client->headers );
		// dump content
		echo PHP_EOL . $client->content;
	},
	function ( \Exception $ex ) {
		echo 'ERROR '.$ex->getCode().' '.$ex->getMessage();
	}
);
// enable debug mode
$http->on('debug', function( $s ) { echo trim($s).PHP_EOL; } );
$loop->run();
```

Install
-------

[](#install)

The recommended way to install this library is [through Composer](https://getcomposer.org). [New to Composer?](https://getcomposer.org/doc/00-intro.md)

This will install the latest supported version:

```
$ composer require shuchkin/react-http-client
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2462d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/551f9169d9efadfa85ff5ff512eab17e9219ba10e42636d9a31f1021a1027395?d=identicon)[shuchkin](/maintainers/shuchkin)

---

Top Contributors

[![shuchkin](https://avatars.githubusercontent.com/u/315872?v=4)](https://github.com/shuchkin "shuchkin (31 commits)")

---

Tags

httpclientreactphp

### Embed Badge

![Health badge](/badges/shuchkin-react-http-client/health.svg)

```
[![Health](https://phpackages.com/badges/shuchkin-react-http-client/health.svg)](https://phpackages.com/packages/shuchkin-react-http-client)
```

###  Alternatives

[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)[clue/redis-react

Async Redis client implementation, built on top of ReactPHP.

28210.5M45](/packages/clue-redis-react)[clue/http-proxy-react

Async HTTP proxy connector, tunnel any TCP/IP-based protocol through an HTTP CONNECT proxy server, built on top of ReactPHP

472.3M33](/packages/clue-http-proxy-react)[binsoul/net-mqtt-client-react

Asynchronous MQTT client built on React

48787.8k24](/packages/binsoul-net-mqtt-client-react)[clue/docker-react

Async, event-driven access to the Docker Engine API, built on top of ReactPHP.

113154.9k1](/packages/clue-docker-react)[valga/fbns-react

A PHP client for the FBNS built on top of ReactPHP

15751.3k19](/packages/valga-fbns-react)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
