PHPackages                             ginsen/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. ginsen/http-client

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

ginsen/http-client
==================

Http client handler with multiple asynchronous requests in parallel

v1.0.2(10mo ago)02MITPHPPHP ^8.0CI passing

Since Jun 23Pushed 10mo agoCompare

[ Source](https://github.com/ginsen/http-client)[ Packagist](https://packagist.org/packages/ginsen/http-client)[ Docs](https://github.com/ginsen/http-client)[ RSS](/packages/ginsen-http-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (6)Versions (4)Used By (0)

HttpClient
==========

[](#httpclient)

[![Latest Stable Version](https://camo.githubusercontent.com/2d57af6f6a6dc0988e5279a920e629c046193a97c27976dc6eb56d375ed56531/687474703a2f2f706f7365722e707567782e6f72672f67696e73656e2f687474702d636c69656e742f76)](https://packagist.org/packages/ginsen/http-client)[![Total Downloads](https://camo.githubusercontent.com/8eb54608a40fce30ed51c9f475cfb40283aa6988b0461e3c0e5404910577a726/687474703a2f2f706f7365722e707567782e6f72672f67696e73656e2f687474702d636c69656e742f646f776e6c6f616473)](https://packagist.org/packages/ginsen/http-client)[![Latest Unstable Version](https://camo.githubusercontent.com/12ac359a358bafda238f42a97f4a7940fc8ec722aba80ccd0bad2edf0bd5b52b/687474703a2f2f706f7365722e707567782e6f72672f67696e73656e2f687474702d636c69656e742f762f756e737461626c65)](https://packagist.org/packages/ginsen/http-client)[![License](https://camo.githubusercontent.com/c3245ca8f63cfd4bdc799f7f408f75530e21327adec03a9fb3c1e0ef77503fc9/687474703a2f2f706f7365722e707567782e6f72672f67696e73656e2f687474702d636c69656e742f6c6963656e7365)](https://packagist.org/packages/ginsen/http-client)[![PHP Version Require](https://camo.githubusercontent.com/32e5fde5b9bf74eed9e1fa40c20bf3a17b7056f3c13f81a4440257a9a17539e7/687474703a2f2f706f7365722e707567782e6f72672f67696e73656e2f687474702d636c69656e742f726571756972652f706870)](https://packagist.org/packages/ginsen/http-client)

This library allows you to make several HTTP requests in parallel, reducing the overall time of the set of requests.

You can use it for a single request by following the [PSR-18 HTTP Client](https://www.php-fig.org/psr/psr-18/), see the test snippet.

```
#[Test]
public function it_should_handler_one_request_as_psr_18(): void
{
    $client = new HttpClient();

    $response = $client->sendRequest(
        new Request('GET', 'https://jsonplaceholder.typicode.com/todos/1')
    );

    self::assertInstanceOf(ResponseInterface::class, $response);
    self::assertSame(200, $response->getStatusCode());
}
```

Or you can send a collection of `Psr\Http\Message\RequestInterface` and retrieve an array of `Psr\Http\Message\ResponseInterface`, see the test.

```
#[Test]
public function it_should_handler_several_requests(): void
{
    $client = new HttpClient();

    $requests['todos'] = new Request('GET', 'https://jsonplaceholder.typicode.com/todos/1');
    $requests['posts'] = new Request('GET', 'https://jsonplaceholder.typicode.com/posts/1');

    $responses = $client->sendRequest(...$requests);

    self::assertInstanceOf(ResponseInterface::class, $responses['todos']);
    self::assertInstanceOf(ResponseInterface::class, $responses['posts']);

    self::assertSame(200, $responses['todos']->getStatusCode());
    self::assertSame(200, $responses['posts']->getStatusCode());
}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance53

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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

Every ~0 days

Total

3

Last Release

328d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1165397?v=4)[José Ginés Hernández Galindo](/maintainers/ginsen)[@ginsen](https://github.com/ginsen)

---

Top Contributors

[![ginfarma](https://avatars.githubusercontent.com/u/127508196?v=4)](https://github.com/ginfarma "ginfarma (6 commits)")[![ginsen](https://avatars.githubusercontent.com/u/1165397?v=4)](https://github.com/ginsen "ginsen (2 commits)")

---

Tags

httpresponserequestpsrclientRequestInterfaceResponseInterface

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k692.9M1.9k](/packages/psr-http-factory)[psr/http-server-handler

Common interface for HTTP server-side request handler

175101.3M921](/packages/psr-http-server-handler)[psr/http-server-middleware

Common interface for HTTP server-side middleware

18091.2M1.5k](/packages/psr-http-server-middleware)[art4/requests-psr18-adapter

Use WordPress/Requests as a PSR-18 HTTP client

153.3k](/packages/art4-requests-psr18-adapter)[chillerlan/php-httpinterface

A PSR-7/17/18 http message/client implementation

1417.1k5](/packages/chillerlan-php-httpinterface)

PHPackages © 2026

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