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

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

ghostwriter/http
================

HTTP Client and Server abstraction for PHP.

0.1.0(2mo ago)029.0k↑16.2%[4 issues](https://github.com/ghostwriter/http/issues)1BSD-3-ClausePHPPHP ~8.4.0 || ~8.5.0CI failing

Since Feb 22Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/ghostwriter/http)[ Packagist](https://packagist.org/packages/ghostwriter/http)[ Docs](https://github.com/ghostwriter/http)[ GitHub Sponsors](https://github.com/sponsors/ghostwriter)[ RSS](/packages/ghostwriter-http/feed)WikiDiscussions 0.1.x Synced 1mo ago

READMEChangelog (1)Dependencies (16)Versions (9)Used By (1)

Http
====

[](#http)

[![GitHub Sponsors](https://camo.githubusercontent.com/375830e83033c9b58ef3b9d860c76553b27d38c6f196ae4e44ce1e5343a650c0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73706f6e736f72732f67686f73747772697465723f6c6162656c3d53706f6e736f722b4067686f73747772697465722f68747470266c6f676f3d4769744875622b53706f6e736f7273)](https://github.com/sponsors/ghostwriter)[![Automation](https://github.com/ghostwriter/http/actions/workflows/automation.yml/badge.svg)](https://github.com/ghostwriter/http/actions/workflows/automation.yml)[![Supported PHP Version](https://camo.githubusercontent.com/392e13d943fc720a157bd8b3ce1968e8b3498dd8d13706bc1b12071960037b96/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f7068702f67686f73747772697465722f687474703f636f6c6f723d383839326266)](https://www.php.net/supported-versions)[![Downloads](https://camo.githubusercontent.com/4564c73553e96e16a06cc3a4ba7faf2908c9102b25808147761db966290a5185/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f64742f67686f73747772697465722f687474703f636f6c6f723d626c7565)](https://packagist.org/packages/ghostwriter/http)

HTTP Client and Server abstraction for PHP.

> **Warning**
>
> This project is not finished yet, work in progress.

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

[](#installation)

You can install the package via composer:

```
composer require ghostwriter/http
```

RFC
---

[](#rfc)

- [RFC3864: Registration Procedures for Message Header Fields](https://datatracker.ietf.org/doc/html/rfc3864)
- [RFC5234: Augmented BNF for Syntax Specifications](https://datatracker.ietf.org/doc/html/rfc5234)
- [RFC9110: HTTP Semantics](https://datatracker.ietf.org/doc/html/rfc9110)
- [RFC9111: HTTP Caching](https://datatracker.ietf.org/doc/html/rfc9111)
- [RFC9112: HTTP/1.1](https://datatracker.ietf.org/doc/html/rfc9112)
- [RFC9113: HTTP/2](https://datatracker.ietf.org/doc/html/rfc9113)
- [RFC9114: HTTP/3](https://datatracker.ietf.org/doc/html/rfc9114)

Usage
-----

[](#usage)

```
$router =  Router::new();

$router->addRoute('GET', '/', HomeHandler::class, [GuestMiddleware::class]);

$router->get('/about', AboutHandler::class, [GuestMiddleware::class]);

$router->get('/auth/github', GitHubLoginHandler::class, [GuestMiddleware::class], 'auth.login.github');

    // create, read, edit, update, store, delete, view, show
$router->middleware([GuestMiddleware::class], function($router){
    $router->get('/auth/login', LoginCreateHandler::class, 'auth.login.create');
    $router->post('/auth/login', LoginStoreHandler::class, 'auth.login.store');

    $router->get('/auth/register', RegisterCreateHandler::class, 'auth.register.create');
    $router->post('/auth/register', RegisterStoreHandler::class, 'auth.register.store');

    $router->get('/posts', PostIndexHandler::class, 'members.index');
    $router->get('/posts/{post}/{?slug}', PostShowHandler::class, 'members.show');
});

$router->middleware([AuthMiddleware::class], function($router){
    $router->get('/users', MembersIndexHandler::class, 'members.index');
    $router->get('/users/{member}', MemberShowHandler::class, 'members.show');

    $router->get('/posts/create', PostCreateHandler::class, 'members.create');
    $router->post('/posts', PostStoreHandler::class, 'members.store');
    $router->get('/posts/{post}/edit', PostEditHandler::class, 'members.edit');
    $router->put('/posts/{post}', PostUpdateHandler::class, 'members.update');
    $router->delete('/posts/{post}', PostDeleteHandler::class, 'members.delete');
});

$request =  ServerRequest::new();

$server =  Server::new($router); // RequestHandler

$server->handle($request); // Response
```

### Changelog

[](#changelog)

Please see [CHANGELOG.md](./CHANGELOG.md) for more information what has changed recently.

### Security

[](#security)

If you discover any security related issues, please email `nathanael.esayeas@protonmail.com` or create a [Security Advisory](https://github.com/ghostwriter/clock/security/advisories/new) instead of using the issue tracker.

License
-------

[](#license)

The BSD-3-Clause. Please see [License File](./LICENSE) for more information.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance86

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

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.

###  Release Activity

Cadence

Every ~10 days

Total

4

Last Release

54d ago

Major Versions

0.2.x-dev → 1.0.x-dev2026-03-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/1dbb0131801cc451dad9917ab29aa823b25d7eebc9f3875a9d481d109bdb44ee?d=identicon)[ghostwriter](/maintainers/ghostwriter)

---

Top Contributors

[![ghostwriter](https://avatars.githubusercontent.com/u/9754361?v=4)](https://github.com/ghostwriter "ghostwriter (1038 commits)")

---

Tags

ghostwriterhttpphphttpghostwriter

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[laudis/neo4j-php-client

Neo4j-PHP-Client is the most advanced PHP Client for Neo4j

184616.9k31](/packages/laudis-neo4j-php-client)[tempest/framework

The PHP framework that gets out of your way.

2.1k23.1k9](/packages/tempest-framework)[cakephp/authentication

Authentication plugin for CakePHP

1153.6M67](/packages/cakephp-authentication)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[mezzio/mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.

28483.0k2](/packages/mezzio-mezzio-authentication-oauth2)

PHPackages © 2026

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