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. [HTTP &amp; Networking](/categories/http)
4. /
5. dlzer/http-utils

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

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 yesterday

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 1% 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://avatars.githubusercontent.com/u/22087888?v=4)[DLzer](/maintainers/DLzer)[@DLzer](https://github.com/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)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M7.0k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M92](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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