PHPackages                             jeyroik/json-reqres - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jeyroik/json-reqres

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jeyroik/json-reqres
===================

Simple wrapper for json responses

0.2.2(3y ago)08PHP

Since May 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/jeyroik/json-reqres)[ Packagist](https://packagist.org/packages/jeyroik/json-reqres)[ RSS](/packages/jeyroik-json-reqres/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (7)Used By (0)

json-reqres
===========

[](#json-reqres)

Simple wrapper for JSON responses.

[![tests](https://github.com/jeyroik/json-reqres/workflows/PHP%20Composer/badge.svg?branch=master&event=push)](https://github.com/jeyroik/json-reqres/workflows/PHP%20Composer/badge.svg?branch=master&event=push)[![codecov.io](https://camo.githubusercontent.com/92d85b6ad8d73405b4d8074f020640532083f509eb8f6bab27415f4f2ad07e3e/68747470733a2f2f636f6465636f762e696f2f67682f6a6579726f696b2f6a736f6e2d7265717265732f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/92d85b6ad8d73405b4d8074f020640532083f509eb8f6bab27415f4f2ad07e3e/68747470733a2f2f636f6465636f762e696f2f67682f6a6579726f696b2f6a736f6e2d7265717265732f636f7665726167652e7376673f6272616e63683d6d6173746572)[![PHPStan Enabled](https://camo.githubusercontent.com/441b5874ce4df0a2defc892979c96c46889b69cb32119d04f0b48626349f8bc9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d627269676874677265656e2e7376673f7374796c653d666c6174)](https://github.com/phpstan/phpstan)[![](https://camo.githubusercontent.com/ffbbaaeace67caa5dc26d1d127f093d146ce93a65c0b4276dfb012dd25f8a7b8/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f63663034376361623533613830333066313462362f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/jeyroik/json-reqres/maintainability)[![Latest Stable Version](https://camo.githubusercontent.com/68c792d313eb33a1b21969971d21ce2f6a95456b1d1301267e9d44011c6b49e6/68747470733a2f2f706f7365722e707567782e6f72672f6a6579726f696b2f6a736f6e2d7265717265732f76)](//packagist.org/packages/jeyroik/json-reqres)[![Total Downloads](https://camo.githubusercontent.com/85c25c038f393db2d10b403a023ed9dd22bd81fcd212fcc734768f27c3c70abb/68747470733a2f2f706f7365722e707567782e6f72672f6a6579726f696b2f6a736f6e2d7265717265732f646f776e6c6f616473)](//packagist.org/packages/jeyroik/json-reqres)[![Dependents](https://camo.githubusercontent.com/e817dab40d1de9b68edc4c0f05a0bb1d5b54dd623a9e8836f7863da0d96932c3/68747470733a2f2f706f7365722e707567782e6f72672f6a6579726f696b2f6a736f6e2d7265717265732f646570656e64656e7473)](//packagist.org/packages/jeyroik/json-reqres)

Usage
=====

[](#usage)

```
$request = new Request([
  Request::FIELD__METHOD => Request::METHOD__GET,
  Request::FIELD__BASE_URL => 'https://github.com/',
  Request::FIELD__ENDPOINT => 'operationName',
  Request::FIELD__PARAMETERS => [
   'param1' => 'value1'
 ]
]);

$response = $request->run();

print_r($response->getResult(), true);
```

Dispatchers
===========

[](#dispatchers)

You can additionally dispatch request by dispatcher logic:

```
$request = new Request([
  Request::FIELD__METHOD => Request::METHOD__GET,
  Request::FIELD__BASE_URL => 'https://github.com/',
  Request::FIELD__ENDPOINT => 'operationName',
  Request::FIELD__DISPATCHER_REQUEST => '\\dispatcher\\class\\Name',
  Request::FIELD__DISPATCHER_RESPONSE => '\\dispatcher\\class\\Name',
  Request::FIELD__PARAMETERS => [
   'param1' => 'value1'
 ]
]);
```

- Request dispatcher should implement `jeyroik\interfaces\requests\dispatchers\IDispatcher` interface.
- Response dispatcher should implement `jeyroik\interfaces\responses\dispatchers\IDispatcher` interface.
- Default request dispatcher is `jeyroik\components\requests\dispatchers\ApiKey`. See this class for usage details.
- Default response dispatcher is `jeyroik\components\responses\dispatchers\WrapResult`. See this class for usage details.

Environment
===========

[](#environment)

This env parameters are available:

- `REQRES__CLIENT` client class name, for example `\\GuzzleHttp\\Client`.
- `REQRES__API_KEY__TOKEN` api key token for using with `ApiKey` dispatcher (see `src\components\requests\dispatchers` for details).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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 ~0 days

Total

6

Last Release

1453d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2aaec5c4bade6ab2b5d1a0f7d97ab4e0ff2ce83937f76499b2888ad16cde5e04?d=identicon)[jeyroik](/maintainers/jeyroik)

---

Top Contributors

[![jeyroik](https://avatars.githubusercontent.com/u/6348124?v=4)](https://github.com/jeyroik "jeyroik (14 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jeyroik-json-reqres/health.svg)

```
[![Health](https://phpackages.com/badges/jeyroik-json-reqres/health.svg)](https://phpackages.com/packages/jeyroik-json-reqres)
```

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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