PHPackages                             php\_modules/request-input - 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. php\_modules/request-input

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

php\_modules/request-input
==========================

HTTP Request input/body parser for php rest API.

1.0.1(4y ago)225MITPHPPHP &gt;=5.6.20

Since Jul 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Samils/request-input)[ Packagist](https://packagist.org/packages/php_modules/request-input)[ Docs](https://github.com/samils/request-input)[ RSS](/packages/php-modules-request-input/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

RequestInput
============

[](#requestinput)

HTTP Request input/body parser for php rest API.

This should be used as a body parser for an http request in a rest API;

Assuming that an http request can be sent with some information in different formats like: XML, JSON, YAML, and others; Request Input accepts all of the above, and can be complemented by creating a custom parser.

Install
=======

[](#install)

- From the prompt command line \[cmd\]

```
composer require php_modules/request-input
```

- composer.json

```
{
  "require": {
    "php_modules/request-input": "^1.0.1"
  }
}
```

USE
===

[](#use)

Without php-module
------------------

[](#without-php-module)

```
use Sammy\Packs\RequestInput;

$request = new RequestInput;

$body = $request->getRequestInput();
```

With php-module
---------------

[](#with-php-module)

```
$request = requires ('request-input');

$body = $request->getRequestInput();
```

The '$body' variable should be evaluated acording to the request body.

Below is a list of data type matches supported by requestInput.

### JSON

[](#json)

```
{
  "user": {
    "name": "Foo",
    "email": "foo@bar",
    "site": "foobar.baz"
  }
}
```

### YAML

[](#yaml)

```
user:
  name: Foo
  email: foo@bar
  size: foobar.baz
```

### XML

[](#xml)

```

  Foo
  foo@bar
  foobar.baz

```

Any of the request body below should be send with a header acording to the used type; so RequestInput may parse the sent request body to be used in php.

Frameworks like @Samils should parse it automatically and provide the request body as a property of a '$request' object.

Using it inside a @Samils Controller should be done as bellow:

```
namespace Application\Controller;

class SomeController extends SamiController {
  public function someAction () {
    # $requestBody = params;
    $user = params['user'];
  }
}
```

So, the basical way for using RequestInput should aid you parsing any request body sent to a rest API.

...

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

1771d ago

### Community

Maintainers

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

---

Top Contributors

[![agostinhosamil](https://avatars.githubusercontent.com/u/53584688?v=4)](https://github.com/agostinhosamil "agostinhosamil (11 commits)")

---

Tags

httpinputhttp-bodybody-parserrequest-input-parserrequest-body-parserinput-parserhttp-request-bodyhttp-request-body-parserhttp-request-inputhttp-request-input-parser

### Embed Badge

![Health badge](/badges/php-modules-request-input/health.svg)

```
[![Health](https://phpackages.com/badges/php-modules-request-input/health.svg)](https://phpackages.com/packages/php-modules-request-input)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.0B3.2k](/packages/guzzlehttp-psr7)[psr/http-message

Common interface for HTTP messages

7.1k1.0B5.5k](/packages/psr-http-message)[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k692.9M1.9k](/packages/psr-http-factory)[psr/http-client

Common interface for HTTP clients

1.7k680.7M2.1k](/packages/psr-http-client)[symfony/http-client

Provides powerful methods to fetch HTTP resources synchronously or asynchronously

2.0k314.0M3.4k](/packages/symfony-http-client)[psr/link

Common interfaces for HTTP links

2.5k144.1M68](/packages/psr-link)

PHPackages © 2026

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