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. [HTTP &amp; Networking](/categories/http)
4. /
5. poirot/http-agent

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

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 1mo ago

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 23% 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)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M317](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M292](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

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

78126.4M414](/packages/react-http)

PHPackages © 2026

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