PHPackages                             realconnex/http-response - 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. realconnex/http-response

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

realconnex/http-response
========================

Realconnex response library.

0.0.6(7y ago)0617MITPHPPHP &gt;=7.0.0

Since Aug 23Pushed 7y agoCompare

[ Source](https://github.com/RealConnex/realconnex-response)[ Packagist](https://packagist.org/packages/realconnex/http-response)[ RSS](/packages/realconnex-http-response/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (7)Used By (0)

Realconnex HTTP Response package
================================

[](#realconnex-http-response-package)

This is made to standardize service http responses

### Installation

[](#installation)

```
$ composer require realconnex/http-response
```

Register class as a service in service.yml

```
Realconnex\HttpResponse:
    autowire: true
```

To send simple response(e.g.: entity)

```
public function getFeedById(Feeds $feed, HttpResponse $response) : HttpResponse
{
    return $response->setContent($feed)->sendResponse();
}
```

Or if result is an array of data

```
public function getFeeds(Request $request, HttpResponse $response) : HttpResponse
{
    $page = (int)$request->get('page', 1);
    $limit = (int)$request->get('limit', 20);
    $data = $this->repository->list($page, $limit);

    return $response
        ->setItems($items)
        ->setPage($currentPage)
        ->setTotalPages($totalPages])
        ->setNextPage($nextPage)
        ->setPrevPage($prevPage)
        ->setLimit($limit)
        ->sendResponse();
}
```

Or operation result

```
public function deleteFeed(Feeds $feed, HttpResponse $response) : HttpResponse
{
    return $response->setResult($this->repository->delete($feed))->sendResponse();
}
```

If you don't want to send response variable through parameters you can instantiate in manually, but you should send serializer in HttpResponse constructor

```
$response = new HttpResponse(SerializerInterface $serializer);
$response->setItems($items)->sendResponse();
```

NOTE: You MUST send response at the end like `->sendResponse();`

### List of allowed setters

[](#list-of-allowed-setters)

```
setItems(array $items = [])
setLimit(int $limit)
setPage(int $page)
setOffset(?int $page)
setTotalPages(int $pages)
setNextPage(?int $page)
setPrevPage(?int $page)
setSerializationGroups(array $groups = ['out'])
setHeaders(array $headers = ['Content-Type' => 'application/json'])
setStatusCode(int $status = 200)
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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

Every ~19 days

Total

6

Last Release

2723d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1d9e9cdabe2972cb1cbf51b49f1b6265436d94287367d1a1ff082f024985004b?d=identicon)[Daniilm](/maintainers/Daniilm)

![](https://avatars.githubusercontent.com/u/5227807?v=4)[Paul](/maintainers/p-lebedev)[@p-lebedev](https://github.com/p-lebedev)

![](https://www.gravatar.com/avatar/a82adbd09a9a23eb2fdd0294e1600172e36de87b1e7e539ae94a58417bf08c45?d=identicon)[denisb](/maintainers/denisb)

---

Top Contributors

[![lebedevrc](https://avatars.githubusercontent.com/u/39629333?v=4)](https://github.com/lebedevrc "lebedevrc (20 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/realconnex-http-response/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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