PHPackages                             iothost/phpresponse - 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. iothost/phpresponse

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

iothost/phpresponse
===================

Simple PHP class for handling HTTP response right way.

1.0.0(9y ago)017MITPHP

Since Mar 20Pushed 9y ago1 watchersCompare

[ Source](https://github.com/iothost/phpresponse)[ Packagist](https://packagist.org/packages/iothost/phpresponse)[ RSS](/packages/iothost-phpresponse/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (2)Used By (0)

\##iothost/phpresponse

Simple PHP class to handle responses correctly.

\####Installation `composer require iothost/phpresponse`

\####Example usage

```
$loader = require './vendor/autoload.php';
$response = new \Iothost\PhpResponse\Response();

// add header
$response->addHeader('Cache-Control: no-cache');

// set Content-Type, can be entered as a string
$response->addHeader($response::CT_TEXT);

// set HTTP status code, can be entered as a number (int)
$response->setStatus($response::STATUS_OK);

// set response body as a string
$response->setBody($string);
// OR
// set response body as JSON (from array)
$response->setBodyJson($array);

// send response
$response->send();

```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

3390d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/614935?v=4)[Šimon Berka](/maintainers/berkas1)[@berkas1](https://github.com/berkas1)

---

Top Contributors

[![berkas1](https://avatars.githubusercontent.com/u/614935?v=4)](https://github.com/berkas1 "berkas1 (1 commits)")

### Embed Badge

![Health badge](/badges/iothost-phpresponse/health.svg)

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

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

The Illuminate Http package.

11937.2M6.6k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

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

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

Router subcomponent for Mezzio

265.4M85](/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)
