PHPackages                             maxiwheat/httpful - 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. maxiwheat/httpful

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

maxiwheat/httpful
=================

A Readable, Chainable, REST friendly, PHP HTTP Client

0.4.0(3y ago)120.7k↓32.8%MITPHPPHP &gt;=8.1

Since Apr 5Pushed 3y agoCompare

[ Source](https://github.com/maxiwheat/httpful)[ Packagist](https://packagist.org/packages/maxiwheat/httpful)[ Docs](https://github.com/maxiwheat/httpful)[ RSS](/packages/maxiwheat-httpful/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

### Fork

[](#fork)

PHP 8.1 or higher required.

**Installation**

```
{
  "require": {
    "maxiwheat/httpful": "^0.4"
  }
}
```

**Local Development**

```
docker compose run --rm httpful bash

# In the container shell

# Install dependencies
composer install

# Run tests
vendor/bin/phpunit

# Run phpstan
vendor/bin/phpstan analyse src
vendor/bin/phpstan analyse tests
```

Httpful
=======

[](#httpful)

[![Total Downloads](https://camo.githubusercontent.com/8986c7bb7259285d52d79f6c8acb93027efc5788bdfcce773af14857b1265d0d/68747470733a2f2f706f7365722e707567782e6f72672f6d61786977686561742f6874747066756c2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/maxiwheat/httpful)

Httpful is a simple Http Client library for PHP 7.2+. There is an emphasis of readability, simplicity, and flexibility – basically provide the features and flexibility to get the job done and make those features really easy to use.

Features

- Readable HTTP Method Support (GET, PUT, POST, DELETE, HEAD, PATCH and OPTIONS)
- Custom Headers
- Automatic "Smart" Parsing
- Automatic Payload Serialization
- Basic Auth
- Client Side Certificate Auth
- Request "Templates"

Sneak Peak
==========

[](#sneak-peak)

Here's something to whet your appetite. Search the twitter API for tweets containing "#PHP". Include a trivial header for the heck of it. Notice that the library automatically interprets the response as JSON (can override this if desired) and parses it as an array of objects.

```
// Make a request to the GitHub API with a custom
// header of "X-Trvial-Header: Just as a demo".
$url = "https://api.github.com/users/maxiwheat";
$response = src\Request::get($url)
    ->expectsJson()
    ->withXTrivialHeader('Just as a demo')
    ->send();

echo "{$response->body->name} joined GitHub on " .
                        date('M jS', strtotime($response->body->created_at)) ."\n";
```

Installation
============

[](#installation)

Composer
--------

[](#composer)

Httpful is PSR-0 compliant and can be installed using [composer](http://getcomposer.org/). Simply add `maxiwheat/httpful` to your composer.json file. *Composer is the sane alternative to PEAR. It is excellent for managing dependencies in larger projects*.

```
{
  "require": {
    "maxiwheat/httpful": "*"
  }
}
```

Contributing
============

[](#contributing)

Httpful highly encourages sending in pull requests. When submitting a pull request please:

- All pull requests should target the `dev` branch (not `master`)
- Make sure your code follows the [coding conventions](http://pear.php.net/manual/en/standards.php)
- Please use soft tabs (four spaces) instead of hard tabs
- Make sure you add appropriate test coverage for your changes
- Run all unit tests in the test directory via `phpunit ./tests`
- Include commenting where appropriate and add a descriptive pull request message

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor3

3 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

1139d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f2aecd5faa9c010a0f9e6274d5ededc28647332712855ffb0b777bd0bbb6b4c?d=identicon)[maxiwheat](/maintainers/maxiwheat)

---

Top Contributors

[![nategood](https://avatars.githubusercontent.com/u/154115?v=4)](https://github.com/nategood "nategood (55 commits)")[![nickl-](https://avatars.githubusercontent.com/u/1404606?v=4)](https://github.com/nickl- "nickl- (13 commits)")[![josch1710](https://avatars.githubusercontent.com/u/1742593?v=4)](https://github.com/josch1710 "josch1710 (8 commits)")[![bpedro](https://avatars.githubusercontent.com/u/56472?v=4)](https://github.com/bpedro "bpedro (7 commits)")[![zdouglas](https://avatars.githubusercontent.com/u/6619887?v=4)](https://github.com/zdouglas "zdouglas (7 commits)")[![mishak87](https://avatars.githubusercontent.com/u/276500?v=4)](https://github.com/mishak87 "mishak87 (5 commits)")[![cviebrock](https://avatars.githubusercontent.com/u/166810?v=4)](https://github.com/cviebrock "cviebrock (5 commits)")[![aonic](https://avatars.githubusercontent.com/u/249801?v=4)](https://github.com/aonic "aonic (4 commits)")[![dtelaroli](https://avatars.githubusercontent.com/u/536500?v=4)](https://github.com/dtelaroli "dtelaroli (4 commits)")[![stewsnooze](https://avatars.githubusercontent.com/u/196643?v=4)](https://github.com/stewsnooze "stewsnooze (4 commits)")[![andrzejd-pl](https://avatars.githubusercontent.com/u/25104566?v=4)](https://github.com/andrzejd-pl "andrzejd-pl (3 commits)")[![atymic](https://avatars.githubusercontent.com/u/50683531?v=4)](https://github.com/atymic "atymic (3 commits)")[![livkiss](https://avatars.githubusercontent.com/u/256075?v=4)](https://github.com/livkiss "livkiss (3 commits)")[![ramiel](https://avatars.githubusercontent.com/u/324687?v=4)](https://github.com/ramiel "ramiel (3 commits)")[![hello-josh](https://avatars.githubusercontent.com/u/638073?v=4)](https://github.com/hello-josh "hello-josh (2 commits)")[![luads](https://avatars.githubusercontent.com/u/194708?v=4)](https://github.com/luads "luads (2 commits)")[![quafzi](https://avatars.githubusercontent.com/u/164261?v=4)](https://github.com/quafzi "quafzi (2 commits)")[![LeviticusMB](https://avatars.githubusercontent.com/u/1094822?v=4)](https://github.com/LeviticusMB "LeviticusMB (2 commits)")[![Artistan](https://avatars.githubusercontent.com/u/801349?v=4)](https://github.com/Artistan "Artistan (2 commits)")[![GeLoLabs](https://avatars.githubusercontent.com/u/149005863?v=4)](https://github.com/GeLoLabs "GeLoLabs (2 commits)")

---

Tags

httpapirestcurlrestfulrequests

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/maxiwheat-httpful/health.svg)

```
[![Health](https://phpackages.com/badges/maxiwheat-httpful/health.svg)](https://phpackages.com/packages/maxiwheat-httpful)
```

###  Alternatives

[nategood/httpful

A Readable, Chainable, REST friendly, PHP HTTP Client

1.8k17.2M267](/packages/nategood-httpful)[voku/httpful

A Readable, Chainable, REST friendly, PHP HTTP Client

16183.9k1](/packages/voku-httpful)[ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

4540.0k](/packages/ismaeltoe-osms)[msankhala/parsehub-php

Php wrapper classes for Parsehub REST api.

1312.4k](/packages/msankhala-parsehub-php)[wellrested/wellrested

Simple PHP Library for RESTful APIs

4818.7k4](/packages/wellrested-wellrested)

PHPackages © 2026

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