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

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

wpdiggerstudio/wpzylos-http
===========================

HTTP Request, Response and Middleware pipeline for WPZylos framework

v1.0.0(5mo ago)02311MITPHPPHP ^8.0CI failing

Since Feb 1Pushed 2w agoCompare

[ Source](https://github.com/WPDiggerStudio/wpzylos-http)[ Packagist](https://packagist.org/packages/wpdiggerstudio/wpzylos-http)[ Docs](https://github.com/WPDiggerStudio/wpzylos-http)[ Fund](https://www.paypal.com/donate/?hosted_button_id=66U4L3HG4TLCC)[ RSS](/packages/wpdiggerstudio-wpzylos-http/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (1)

wpzylos/http
============

[](#wpzyloshttp)

A WordPress-friendly HTTP layer providing clean request capture, sanitized input helpers, structured responses, and a middleware pipeline — all designed to work seamlessly within the WordPress ecosystem.

**Namespace:** `WPZylos\Framework\Http`

---

Features
--------

[](#features)

- **Request Capture** — Automatically captures `$_GET`, `$_POST`, `$_FILES`, and `$_SERVER` with `wp_unslash` applied.
- **Sanitized Input Helpers** — 10 type-safe accessors wrapping WordPress sanitization functions (`sanitize_text_field`, `sanitize_email`, `wp_kses_post`, etc.).
- **Structured Responses** — Static factories for HTML, JSON, redirects, empty, and error responses.
- **Middleware Pipeline** — Laravel-inspired pipeline supporting class names, instances, and callables.
- **Service Provider** — Ready-to-use provider that registers the request as a singleton and the pipeline as a factory.
- **Immutable Request** — Final class with a clear, predictable API.

---

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

[](#requirements)

RequirementVersionPHP8.0+WordPress6.0+---

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

[](#installation)

```
composer require wpzylos/http
```

---

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

[](#quick-start)

### Capture a Request

[](#capture-a-request)

```
use WPZylos\Framework\Http\Request;

$request = Request::capture();
```

### Read Input

[](#read-input)

```
// POST first, then GET
$name = $request->input('name', 'Guest');

// Sanitized helpers
$email = $request->email('email');
$page  = $request->absint('page', 1);

// Subset of input
$credentials = $request->only(['username', 'password']);
```

### Return a Response

[](#return-a-response)

```
use WPZylos\Framework\Http\Response;

// JSON response
$response = Response::json(['status' => 'ok', 'user' => $name]);
$response->send();

// Redirect
Response::redirect('/dashboard')->send();
```

### Middleware Pipeline

[](#middleware-pipeline)

```
use WPZylos\Framework\Http\Pipeline;

$response = (new Pipeline($container))
    ->send($request)
    ->through([AuthMiddleware::class, LoggingMiddleware::class])
    ->then(function (Request $request) {
        return Response::json(['message' => 'Hello!']);
    });
```

---

Documentation
-------------

[](#documentation)

- **[Usage Guide](docs/usage.md)** — Comprehensive guide covering request capture, input reading, responses, middleware, and the service provider.
- **[API Reference](docs/api-reference.md)** — Full method-by-method reference for every class and interface.

---

Support the Project
-------------------

[](#support-the-project)

- [GitHub Sponsors](https://github.com/sponsors/wpdiggerstudio)
- [PayPal Donate](https://www.paypal.com/donate/?hosted_button_id=66U4L3HG4TLCC)

---

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) for details.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance86

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

152d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/55980087?v=4)[WPDiggerStudio](/maintainers/WPDiggerStudio)[@WPDiggerStudio](https://github.com/WPDiggerStudio)

---

Top Contributors

[![WPDiggerStudio](https://avatars.githubusercontent.com/u/55980087?v=4)](https://github.com/WPDiggerStudio "WPDiggerStudio (9 commits)")

---

Tags

httpresponserequestmiddlewarewordpressform-requestwpzylos

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[psr/http-server-middleware

Common interface for HTTP server-side middleware

185103.9M1.9k](/packages/psr-http-server-middleware)[idealo/php-middleware-stack

Implementation of HTTP Middleware PSR-15 specification

3210.4k](/packages/idealo-php-middleware-stack)[elementaryframework/water-pipe

URL routing framework and requests/responses handler for PHP

265.1k4](/packages/elementaryframework-water-pipe)[art4/requests-psr18-adapter

Use WordPress/Requests as a PSR-18 HTTP client

157.1k](/packages/art4-requests-psr18-adapter)

PHPackages © 2026

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