PHPackages                             athena-oss/php-fluent-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. athena-oss/php-fluent-http-client

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

athena-oss/php-fluent-http-client
=================================

PHP Fluent Http Client

v0.9.0(9y ago)2132.4k3Apache-2.0PHP

Since Sep 13Pushed 9y ago3 watchersCompare

[ Source](https://github.com/athena-oss/php-fluent-http-client)[ Packagist](https://packagist.org/packages/athena-oss/php-fluent-http-client)[ RSS](/packages/athena-oss-php-fluent-http-client/feed)WikiDiscussions master Synced 1mo ago

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

PHP Fluent Http Client
======================

[](#php-fluent-http-client)

[![Build Status](https://camo.githubusercontent.com/0e4326a8dacac8da8c2bbbb0a1c7d3ebcd83936a0ee7bf2d1a201b5730f15007/68747470733a2f2f7472617669732d63692e6f72672f617468656e612d6f73732f7068702d666c75656e742d687474702d636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/athena-oss/php-fluent-http-client)

PHP Fluent Http Client is a library for handling http requests and responses with a fluent api.

How to install?
---------------

[](#how-to-install)

You have two options to use it on your project :

- Installing via [composer](https://getcomposer.org/).

```
"require": {
    "athena-oss/php-fluent-http-client": "0.7.0",
 }

```

- Download the latest [release](https://github.com/athena-oss/php-fluent-http-client/releases/latest)

Examples
--------

[](#examples)

### GET method with response assertions on :

[](#get-method-with-response-assertions-on-)

- header value
- content type
- status code

```
$responseJson = (new HttpClient())->get('http://example.com')
            ->withHeader('name', 'value')
            ->withProxy('http://myproxy.com', 3128)
            ->then()
            ->assertThat()
            ->headerValueIsEqual('expected_header', 'expected_value')
            ->responseIsJson()
            ->statusCodeIs(200)
            ->retrieve()
            ->fromJson();
```

### POST method with authorization and assertion on status code :

[](#post-method-with-authorization-and-assertion-on-status-code-)

```
$responseString = (new HttpClient())->put('http://example.com')
            ->withUserAgent('my_user_agent_string')
            ->withDigestAuth('myusername', 'mypassword')
            ->withProxy('http://myproxy', 1234)
            ->withBody('my content', 'my content type')
            ->then()
            ->assertThat()
            ->statusCodeIs(201)
            ->retrieve()
            ->fromString();
```

Contributing
------------

[](#contributing)

Checkout our guidelines on how to contribute in [CONTRIBUTING.md](CONTRIBUTING.md).

Versioning
----------

[](#versioning)

Releases are managed using github's release feature. We use [Semantic Versioning](http://semver.org) for all the releases. Every change made to the code base will be referred to in the release notes (except for cleanups and refactorings).

License
-------

[](#license)

Licensed under the [Apache License Version 2.0 (APLv2)](LICENSE).

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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 ~57 days

Total

5

Last Release

3345d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7646907?v=4)[Rafael Pinto](/maintainers/rafaelspinto)[@rafaelspinto](https://github.com/rafaelspinto)

---

Top Contributors

[![pproenca](https://avatars.githubusercontent.com/u/8202400?v=4)](https://github.com/pproenca "pproenca (7 commits)")[![francisco-aguilar-olx](https://avatars.githubusercontent.com/u/25159557?v=4)](https://github.com/francisco-aguilar-olx "francisco-aguilar-olx (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/athena-oss-php-fluent-http-client/health.svg)

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[illuminate/http

The Illuminate Http package.

11937.2M6.6k](/packages/illuminate-http)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[dreamfactory/df-core

DreamFactory(tm) Core Components

1652.0k38](/packages/dreamfactory-df-core)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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