PHPackages                             jacksonsr451/php-easy-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. jacksonsr451/php-easy-http

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

jacksonsr451/php-easy-http
==========================

This is a simple library by HTTP, with server and message and using PSRs.

v2.4.1(5mo ago)017MITPHPPHP ^8.2

Since Jul 16Pushed 5mo ago1 watchersCompare

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

READMEChangelog (3)Dependencies (1)Versions (8)Used By (0)

PHP Easy HTTP
=============

[](#php-easy-http)

Modern PSR-7/PSR-15 inspired toolkit for building lightweight HTTP services and FastAPI-like microservices in PHP. Ships with strict-typed message objects, a declarative router, middleware pipeline, and an ergonomic `Application` class for rapid development.

---

Requirements
------------

[](#requirements)

- PHP 8.2+ (tested through PHP 8.3)
- Composer for dependency management

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

[](#installation)

```
composer require jacksonsr451/php-easy-http
```

The package exposes all classes under the `PhpEasyHttp\Http` namespace through PSR-4 autoloading.

Key Features
------------

[](#key-features)

- **PSR-7 message implementations** (`Message`, `Request`, `Response`, `ServerRequest`, `Stream`, `Uri`, `UploadFiles`).
- **FastAPI-inspired `Application`** with declarative routing helpers (`get`, `post`, `put`, `patch`, `delete`).
- **Dependency Injection Container** for constructor-free service registration and parameter auto-wiring.
- **Middleware pipeline** compatible with PSR-15 style `process()` methods plus helper registration (`use`, `registerMiddleware`).
- **Automatic response normalization**: arrays/objects become JSON, scalars become JSON payloads, strings become text responses.
- **Route parameter binding &amp; validation** with typed handler signatures.

Project Structure
-----------------

[](#project-structure)

```
src/
├── Message/        # PSR-7 message implementations
├── Server/         # Application, Router, middleware, request handling
└── Server/Support/ # Container, ResponseFactory, callable handlers

```

Quick Start
-----------

[](#quick-start)

```
