PHPackages                             aedart/athenaeum-http-clients - 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. aedart/athenaeum-http-clients

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

aedart/athenaeum-http-clients
=============================

Http Client wrapper along with a Manager that is able to handle multiple client instances (profiles)

10.0.0(1mo ago)0721BSD-3-ClausePHPPHP ^8.4

Since Apr 15Pushed 1mo ago1 watchersCompare

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

READMEChangelogDependencies (22)Versions (167)Used By (1)

Athenaeum Http Clients
======================

[](#athenaeum-http-clients)

This package offers a Http Client wrapper, with a powerful fluent request builder that is able to use different Http Query grammars, supporting both [Json Api](https://jsonapi.org/) and [OData](https://www.odata.org/). In addition, it also comes with a manager that allows you to handle multiple http client "profiles". This allows you to segment each api you communicate with, into it's own client instance.

[Guzzle Http Client](http://docs.guzzlephp.org/en/stable/index.html) is used behind the scene.

Example
-------

[](#example)

Configuration
-------------

[](#configuration)

```
return [

    'profiles' => [

        'my-client' => [
            'driver'    => \Aedart\Http\Clients\Drivers\JsonHttpClient::class,
            'options'   => [
                'base_uri' => 'https://acme.com/api/v2'
            ]
        ],
    ]

    // ... remaining not shown ...
];
```

### Usage

[](#usage)

```
use Aedart\Http\Clients\Traits\HttpClientsManagerTrait;
use Aedart\Contracts\Http\Clients\Responses\Status;
use Teapot\StatusCode;
use DateTime;

class CurrencyController
{
    use HttpClientsManagerTrait;

    public function index()
    {
        $client = $this->getHttpClientsManager()->profile('my-client');

        // Perform a GET request
        $response = $client
            ->useTokenAuth('my-secret-api-token')
            ->where('currency', 'DKK')
            ->whereDate('date', new DateTime('now'))
            ->expect(StatusCode::OK, function(Status $status){
                throw new RuntimeException('API is not available: ' . $status);
            })
            ->get('/currencies');

        // ...remaining not shown
    }
}
```

Motivation
----------

[](#motivation)

A Http Client "package" was made available in version 3.x of the Athenaeum library. It offered the manager to handle multiple "profiles" and some fluent methods for gradually building a request. But it was not as comprehensive as the current version. When Laravel released it's v7.x version, it came with a custom [Http Client](https://laravel.com/docs/7.x/http-client#introduction). Therefore, this package became somewhat irrelevant and was considered for deprecation. Ultimately, I decided to redesign this package entirely, mixing some of the already provided features with lots of new ones.

As a result, this package now draws inspiration from both Laravel's Http Client, as well as the [Database Query Builder](https://laravel.com/docs/7.x/queries#introduction). You will find many similarities between the client offered by Laravel, and the one provided by this package. The intent isn't to copy Laravel's Http Client, but rather to provide a slightly different approach on request building.

When considering whether to use this Http Client, Laravel's or other Http Client, then it's probably best to stick with what you feel most comfortable with. To put a different perspective on this matter, consider that Laravel has a far better support for their packages, than I can currently offer.

Documentation
-------------

[](#documentation)

Please read the [official documentation](https://aedart.github.io/athenaeum/) for additional information.

Repository
----------

[](#repository)

The mono repository is located at [github.com/aedart/athenaeum](https://github.com/aedart/athenaeum)

Versioning
----------

[](#versioning)

This package follows [Semantic Versioning 2.0.0](http://semver.org/)

License
-------

[](#license)

[BSD-3-Clause](http://spdx.org/licenses/BSD-3-Clause), Read the LICENSE file included in this package

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance93

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity92

Battle-tested with a long release history

 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

Every ~13 days

Total

166

Last Release

41d ago

Major Versions

5.27.0 → 6.0.02022-04-05

6.8.1 → 7.0.02023-02-16

7.33.0 → 8.0.02024-03-18

8.22.0 → 9.0.02025-03-04

9.25.1 → 10.0.02026-03-30

PHP version history (7 changes)v4.0PHP &gt;=7.4.0

6.0.0PHP ^8.0.2

7.0.0PHP ^8.1

7.21.0PHP ^8.1.22

8.0.0PHP ^8.2

9.0.0PHP ^8.3

10.0.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b0ca9598955b15d361ffb37656bc1a2e698e8f0850645c1c3872f0b018ac9d2?d=identicon)[aedart](/maintainers/aedart)

---

Top Contributors

[![aedart](https://avatars.githubusercontent.com/u/1523223?v=4)](https://github.com/aedart "aedart (628 commits)")

---

Tags

http-clientsmanagerprofilespsr-7psr-7managerprofilesAthenaeumHttp Clients

### Embed Badge

![Health badge](/badges/aedart-athenaeum-http-clients/health.svg)

```
[![Health](https://phpackages.com/badges/aedart-athenaeum-http-clients/health.svg)](https://phpackages.com/packages/aedart-athenaeum-http-clients)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.0B3.2k](/packages/guzzlehttp-psr7)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[laudis/neo4j-php-client

Neo4j-PHP-Client is the most advanced PHP Client for Neo4j

184616.9k31](/packages/laudis-neo4j-php-client)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[mezzio/mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.

28483.0k2](/packages/mezzio-mezzio-authentication-oauth2)

PHPackages © 2026

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