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

ActiveLibrary

dlzer/http-utils
================

Utility classes and constants for use with PSR-7

00PHP

Since Oct 1Pushed 4y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (1)Used By (0)

PSR Http Message Utilities
==========================

[](#psr-http-message-utilities)

[![GitHub](https://camo.githubusercontent.com/ac91c7e283f89786fc3da3c3d285ae16862dc3d6df62673c79257b03815a7026/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f444c7a65722f687474702d7574696c733f6c6162656c3d4c6963656e7365267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/ac91c7e283f89786fc3da3c3d285ae16862dc3d6df62673c79257b03815a7026/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f444c7a65722f687474702d7574696c733f6c6162656c3d4c6963656e7365267374796c653d666c61742d737175617265)[![GitHub release (latest by date)](https://camo.githubusercontent.com/3a3a89231484c98f3e7b81a76826554bb941f176fc1ae7f97e61efd00182ebdb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f444c7a65722f687474702d7574696c733f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/3a3a89231484c98f3e7b81a76826554bb941f176fc1ae7f97e61efd00182ebdb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f444c7a65722f687474702d7574696c733f7374796c653d666c61742d737175617265)

Utility classes and constants to provide quick reference usage for request methods and responses.

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

[](#installation)

```
compose require dlzer/http-utils
```

Usage
-----

[](#usage)

When used in conjunction with [PHP-FIG](https://github.com/php-fig/http-message-util) Status Code Interface.

```
// Custom responder method
public function withJson(
    ResponseInterface $response,
    $statusCode,
    $message,
    $data = null,
    int $options = 0
    ): ResponseInterface
{
    return $response->write(json_encode([
        "status" => $statusCode,
        "message" => $message,
        "data" => $data
    ], $options);
    );
}

// Usage
$data = ["connection" => true];
return $this->responder->withJson(
    $response, // The response interface
    StatusCodeInterface::STATUS_OK // The status code interface
    StatusCodeMessage::STATUS_OK // The status message interface: "OK"
    $data // The response data
);
```

Output:

```
{
    "status": 200,
    "message": "OK",
    "data": {
        "connection": true
    }
}
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/447d3a64ed1ff4d28ac8d36a214b40ce2a8e9829b9f5d36bacc9b25c9f58dc84?d=identicon)[DLzer](/maintainers/DLzer)

---

Top Contributors

[![DLzer](https://avatars.githubusercontent.com/u/22087888?v=4)](https://github.com/DLzer "DLzer (5 commits)")

### Embed Badge

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

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

PHPackages © 2026

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