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. [HTTP &amp; Networking](/categories/http)
4. /
5. innmind/http-parser

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

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

4.0.0(4mo ago)04.9k1MITPHPPHP ~8.4CI passing

Since Feb 19Pushed 2mo 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 3w ago

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

48

—

FairBetter than 94% of packages

Maintenance82

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

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

127d 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 (83 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

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

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

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/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

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

PHPackages © 2026

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