PHPackages                             innmind/http-parser - 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. innmind/http-parser

ActiveLibrary

innmind/http-parser
===================

4.0.0(1mo ago)04.4k↓100%1MITPHPPHP ~8.4CI passing

Since Feb 19Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Innmind/http-parser)[ Packagist](https://packagist.org/packages/innmind/http-parser)[ Docs](http://github.com/innmind/http-parser)[ RSS](/packages/innmind-http-parser/feed)WikiDiscussions develop Synced today

READMEChangelog (5)Dependencies (4)Versions (8)Used By (1)

HTTP Parser
===========

[](#http-parser)

[![CI](https://github.com/Innmind/http-parser/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Innmind/http-parser/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/aece37451bb8e95bf0df642eceed8897c2feae609d91987b490356843c9f6890/68747470733a2f2f636f6465636f762e696f2f67682f696e6e6d696e642f687474702d7061727365722f6272616e63682f646576656c6f702f67726170682f62616467652e737667)](https://codecov.io/gh/innmind/http-parser)[![Type Coverage](https://camo.githubusercontent.com/350d46a8501a715a3b65030732ca7589adba5e6064c7d434f760819e662fabc1/68747470733a2f2f73686570686572642e6465762f6769746875622f696e6e6d696e642f687474702d7061727365722f636f7665726167652e737667)](https://shepherd.dev/github/innmind/http-parser)

Set of classes to parse any stream into [`innmind/http`](https://packagist.org/packages/innmind/http) objects.

This is useful if you want to parse requests saved in files or build an http server.

Features supported:

- Decoding requests
- Reading streamed requests with `Transfer-Encoding: chunked`
- Extracting `Cookie`s
- Extracting form data
- Extracting query data
- Reading multipart bodies

Installation
------------

[](#installation)

```
composer require innmind/http-parser
```

Usage
-----

[](#usage)

```
use Innmind\HttpParser\{
    Request\Parse,
    ServerRequest\Transform,
    ServerRequest\DecodeCookie,
    ServerRequest\DecodeQuery,
    ServerRequest\DecodeForm,
};
use Innmind\Time\Clock;
use Innmind\IO\IO;
use Innmind\Http\ServerRequest;
use Innmind\Immutable\Str;

// this data could come from anywhere
$raw = streams()
    ->acquire($tmp);
$io
    ->write()
    ->sink(Sequence::of(Str::of($raw)))
    ->unwrap();
\fseek($tmp, 0);

$request = $parse($io->read())
    ->map(Transform::of())
    ->map(DecodeCookie::of())
    ->map(DecodeQuery::of())
    ->map(DecodeForm::of())
    ->match(
        static fn($request) => $request,
        static fn() => throw new \RuntimeException,
    );
$request instanceof ServerRequest, // true
```

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance93

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~218 days

Total

6

Last Release

35d ago

Major Versions

1.1.0 → 2.0.02023-11-25

2.1.0 → 3.0.02025-08-02

3.0.0 → 4.0.02026-02-15

PHP version history (3 changes)1.0.0PHP ~8.1

1.1.0PHP ~8.2

4.0.0PHP ~8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/851425?v=4)[Baptiste Langlade](/maintainers/Baptouuuu)[@Baptouuuu](https://github.com/Baptouuuu)

---

Top Contributors

[![Baptouuuu](https://avatars.githubusercontent.com/u/851425?v=4)](https://github.com/Baptouuuu "Baptouuuu (82 commits)")

### Embed Badge

![Health badge](/badges/innmind-http-parser/health.svg)

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

###  Alternatives

[formal/orm

323.8k](/packages/formal-orm)[innmind/object-graph

Extract object graph out of a root object

242.5k2](/packages/innmind-object-graph)[innmind/git

Git abstraction

141.4k1](/packages/innmind-git)

PHPackages © 2026

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