Download the PHP package php_modules/request-input without Composer
On this page you can find all versions of the php package php_modules/request-input. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download php_modules/request-input
More information about php_modules/request-input
Files in php_modules/request-input
Package request-input
Short Description HTTP Request input/body parser for php rest API.
License MIT
Homepage https://github.com/samils/request-input
Informations about the package request-input
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
-
From the prompt command line [cmd]
- composer.json
USE
Without php-module
With php-module
The '$body' variable should be evaluated acording to the request body.
Below is a list of data type matches supported by requestInput.
JSON
YAML
XML
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:
So, the basical way for using RequestInput should aid you parsing any request body sent to a rest API.
...
All versions of request-input with dependencies
php_modules/core Version ^1.0.2
php_modules/yaml-lite Version ^1.0.5
php_modules/xm1rray Version ^1.0.2