PHPackages                             werkint/reactphp-http - 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. werkint/reactphp-http

Abandoned → [werkint/reactphp-http](/?search=werkint%2Freactphp-http)Library[HTTP &amp; Networking](/categories/http)

werkint/reactphp-http
=====================

Library for building an evented http server.

v0.4.2(9y ago)01.4kMITPHPPHP &gt;=5.4.0

Since Jul 11Pushed 9y ago4 watchersCompare

[ Source](https://github.com/Werkint/reactphp-http)[ Packagist](https://packagist.org/packages/werkint/reactphp-http)[ RSS](/packages/werkint-reactphp-http/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (4)Versions (22)Used By (0)

Http Component
==============

[](#http-component)

[![Build Status](https://camo.githubusercontent.com/7be1c77d8c088f2086a0176d42a97f78c30cc8c5455324817d0e5e1a7656ec18/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f72656163747068702f687474702e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/reactphp/http) [![Code Climate](https://camo.githubusercontent.com/887d0945f925a13b495fa3728d5fda7d447c936cbb482b185523a304ce923130/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f72656163747068702f687474702f6261646765732f6770612e737667)](https://codeclimate.com/github/reactphp/http)

Library for building an evented http server.

This component builds on top of the `Socket` component to implement HTTP. Here are the main concepts:

- **Server**: Attaches itself to an instance of `React\Socket\ServerInterface`, parses any incoming data as HTTP, emits a `request` event for each request.
- **Request**: A `ReadableStream` which streams the request body and contains meta data which was parsed from the request header.
- **Response** A `WritableStream` which streams the response body. You can set the status code and response headers via the `writeHead()` method.

Quickstart example
------------------

[](#quickstart-example)

This is an HTTP server which responds with `Hello World` to every request.

```
$loop = React\EventLoop\Factory::create();
$socket = new React\Socket\Server($loop);

$http = new React\Http\Server($socket);
$http->on('request', function ($request, $response) {
    $response->writeHead(200, array('Content-Type' => 'text/plain'));
    $response->end("Hello World!\n");
});

$socket->listen(1337);
$loop->run();
```

See also the [examples](examples).

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor2

2 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

Every ~143 days

Recently: every ~338 days

Total

12

Last Release

3521d ago

PHP version history (3 changes)v0.1.0PHP &gt;=5.3.2

v0.2.0PHP &gt;=5.3.3

v0.4.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/533d0c99c4e0c7413a1dcce2d81c37ecf94883e6377d274d6f43247a399bb268?d=identicon)[nick4fake](/maintainers/nick4fake)

---

Top Contributors

[![igorw](https://avatars.githubusercontent.com/u/88061?v=4)](https://github.com/igorw "igorw (40 commits)")[![cboden](https://avatars.githubusercontent.com/u/617694?v=4)](https://github.com/cboden "cboden (30 commits)")[![arnaud-lb](https://avatars.githubusercontent.com/u/365207?v=4)](https://github.com/arnaud-lb "arnaud-lb (23 commits)")[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (19 commits)")[![clue](https://avatars.githubusercontent.com/u/776829?v=4)](https://github.com/clue "clue (8 commits)")[![onigoetz](https://avatars.githubusercontent.com/u/309594?v=4)](https://github.com/onigoetz "onigoetz (6 commits)")[![slava-vishnyakov](https://avatars.githubusercontent.com/u/817931?v=4)](https://github.com/slava-vishnyakov "slava-vishnyakov (3 commits)")[![iannsp](https://avatars.githubusercontent.com/u/40551?v=4)](https://github.com/iannsp "iannsp (2 commits)")[![e3betht](https://avatars.githubusercontent.com/u/1811561?v=4)](https://github.com/e3betht "e3betht (1 commits)")[![beaucollins](https://avatars.githubusercontent.com/u/19795?v=4)](https://github.com/beaucollins "beaucollins (1 commits)")[![greevex](https://avatars.githubusercontent.com/u/148401?v=4)](https://github.com/greevex "greevex (1 commits)")[![jsor](https://avatars.githubusercontent.com/u/55574?v=4)](https://github.com/jsor "jsor (1 commits)")[![marenzo](https://avatars.githubusercontent.com/u/1208453?v=4)](https://github.com/marenzo "marenzo (1 commits)")

---

Tags

http

### Embed Badge

![Health badge](/badges/werkint-reactphp-http/health.svg)

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

###  Alternatives

[ccxt/ccxt

A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go

43.2k341.0k1](/packages/ccxt-ccxt)[guzzlehttp/guzzle

Guzzle is a PHP HTTP client library

23.5k1.0B35.0k](/packages/guzzlehttp-guzzle)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M24.8k](/packages/friendsofphp-php-cs-fixer)[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.5k](/packages/aws-aws-sdk-php)[react/http

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

78127.7M461](/packages/react-http)[graham-campbell/guzzle-factory

Provides A Simple Guzzle Factory With Good Defaults

927.0M55](/packages/graham-campbell-guzzle-factory)

PHPackages © 2026

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