PHPackages                             crell/http-tools - 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. crell/http-tools

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

crell/http-tools
================

02.5kPHPCI passing

Since Jun 13Pushed 11mo agoCompare

[ Source](https://github.com/Crell/HttpTools)[ Packagist](https://packagist.org/packages/crell/http-tools)[ RSS](/packages/crell-http-tools/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

PSR HTTP Tools
==============

[](#psr-http-tools)

[![Latest Version on Packagist](https://camo.githubusercontent.com/220647ab1493e1a8a33c3184be5b4102e720e5b3d889d4450c4a837ec4f041dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4372656c6c2f48747470546f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Crell/HttpTools)[![Software License](https://camo.githubusercontent.com/bf1c19b4a07c841715e713542bd6e9c2aaf75ffa2ee2aa3987814d99311f799b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4c47504c76332d677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/33b27a16a212ea2105be9271e4715ef122c8790ddd49b783ddeaa6d598fe5685/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4372656c6c2f48747470546f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Crell/HttpTools)

This library is a loose collection of tools to make working with the PSR HTTP stack a bit easier.

Included tools
--------------

[](#included-tools)

### HttpStatus

[](#httpstatus)

Yet another Enum listing the different typical HTTP response codes used.

### ResponseBuilder

[](#responsebuilder)

ResponseBuilder is a simple convenience wrapper around the PSR-17 factory classes. It provides a single, easy to use "builder" class that produces common PSR-7 response objects types. You may bring your own PSR-17 factory of your choice.

See the [ResponseBuilder](src/ResponseBuilder.php) class, as its methods should be fairly self-explantory just from their names.

### CacheHeaderMiddleware

[](#cacheheadermiddleware)

This zero-configuration middleware ensures that cache headers are stripped from requests/responses that should not have them, according to the HTTP spec.

### EnforceHeadMiddleware

[](#enforceheadmiddleware)

Ensures that the response to a HEAD request has an empty body, even if one was incorrectly set.

### DefaultContentTypeMiddleware

[](#defaultcontenttypemiddleware)

Allows setting a default `content-type` and `accept` header value on incoming requests. Useful for APIs that allow clients to not specify those headers, without code further on needing to account for it being missing.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please use the [GitHub security reporting form](https://github.com/Crell/HttpTools/security) rather than the issue queue.

Credits
-------

[](#credits)

- [Larry Garfield](https://github.com/Crell)
- [All Contributors](../../contributors)

License
-------

[](#license)

The Lesser GPL version 3 or later. Please see [License File](LICENSE.md) for more information.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 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/12e28c223b88445f07d697c8805bd856066c947f70b535f6a7e00d2cb311c3c2?d=identicon)[Crell](/maintainers/Crell)

---

Top Contributors

[![Crell](https://avatars.githubusercontent.com/u/254863?v=4)](https://github.com/Crell "Crell (22 commits)")

### Embed Badge

![Health badge](/badges/crell-http-tools/health.svg)

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M90](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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