PHPackages                             trii/http-headers - 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. trii/http-headers

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

trii/http-headers
=================

WTHeaders is a qvalue? Don't worry, we got that for you!

11111HTML

Since May 13Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Trii/http-headers)[ Packagist](https://packagist.org/packages/trii/http-headers)[ RSS](/packages/trii-http-headers/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

http-headers - The HTTP Header parsing library for PHP
======================================================

[](#http-headers---the-http-header-parsing-library-for-php)

[![Build Status](https://camo.githubusercontent.com/496cbb0f71c5190a65263afcc08001b2fd32f896d9749a2db2fc3695f9b772ca/68747470733a2f2f7472617669732d63692e6f72672f547269692f687474702d686561646572732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Trii/http-headers)

`Accept: text/feedback, application/pull-requests`

SHOULD be interpreted as "*This is a work in progress. Early feedback and pull requests are accepted*"

HTTP is hard and you're probably dealing with headers the wrong way. Do you know what `Accept-Encoding: identity` means? What about a `qvalue`? How about this nonsense:

```
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8,application/json

```

We didn't think so but guess what? You don't have to! That is right, http-headers can parse this for you and just let you know if the requestor accepts what you want to give them and even ask which one they prefer.

Check out how easy this is!

```
use Trii\HTTPHeaders;

$accept = new HTTPHeaders\Accept('audio/*; q=0.2, audio/basic');

var_dump($accept->isAccepted('audio/mpeg'));
// bool(true)

var_dump($accept->getPreferredType());
// string(11) "audio/basic"
```

Awesome right?!?

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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/75bc8cc6de5612589bd7951c2720ddba77c250e4ef2552707c66c7acb9d19371?d=identicon)[Trii](/maintainers/Trii)

---

Top Contributors

[![hello-josh](https://avatars.githubusercontent.com/u/638073?v=4)](https://github.com/hello-josh "hello-josh (9 commits)")

### Embed Badge

![Health badge](/badges/trii-http-headers/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

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

2.8k73.3M319](/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)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[react/http

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

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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