PHPackages                             poirot/http-agent - 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. poirot/http-agent

ActiveLibrary

poirot/http-agent
=================

PHP Http Client.

517PHP

Since Feb 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/phPoirot/HttpAgent)[ Packagist](https://packagist.org/packages/poirot/http-agent)[ RSS](/packages/poirot-http-agent/feed)WikiDiscussions devel Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

HttpAgent
=========

[](#httpagent)

```
$browser = new Browser('http://192.168.123.171/', [
    'request' => [
        'headers' => [
            'Accept' => 'application/json, text/javascript, */*; q=0.01',
        ]
    ]
]);

$result = $browser->POST('/api/v1/auth/login'
    , [ 'form_data'
        => [
            'email'    => 'naderi.payam@gmail.com',
            'password' => '123456'
        ]
    ]
);

$result->expected(function(HttpResponse $httpResponse) use ($browser) {
    $jsonResult = $httpResponse->plg()->json();
    $authHeader = HeaderFactory::factory('Authorization', 'Bearer '.$jsonResult->token);
    $browser->inOptions()->getRequest()->getHeaders()->set(
        $authHeader
    );
});

$browser->GET('/api/v1/users/me', null, [
    'Accept' => 'application/json, text/javascript, */*; q=0.01',
    'X-Requested-With' => 'XMLHttpRequest',
    'Referer' => 'http://localhost:8080/'
])->expected(function($response) {
    $response->flush(false);
});
```

```
$request =
        "GET /payam/ HTTP/1.1\r\n"
        ."Host: 95.211.189.240\r\n"
        ."User-Agent: AranRojan-PHP/5.5.9-1ubuntu4.11\r\n"
        ."Accept-Encoding: gzip\r\n"
        ."Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\r\n"
        ."Cache-Control: no-cache"
    ;
    $browser = new Browser('http://95.211.189.240/', ['connection' => ['allow_decoding' => false]]);
    $res = $browser->request(new HttpRequest($request));

    echo ($res->getRawBody()->read());
```

###  Health Score

22

—

LowBetter than 25% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f784f9dfb58e36b6a876f3057e5664bb904af71d30bb2023583118138dffe9a?d=identicon)[Payam](/maintainers/Payam)

---

Top Contributors

[![E1101](https://avatars.githubusercontent.com/u/427575?v=4)](https://github.com/E1101 "E1101 (129 commits)")

### Embed Badge

![Health badge](/badges/poirot-http-agent/health.svg)

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

PHPackages © 2026

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