/HttpMessage

Just another PHP implementation of PSR-7 - HTTP message interfaces

Primary LanguagePHPMIT LicenseMIT

kambo httpmessage

Build Status Scrutinizer Code Quality Code Coverage Dependency Status Software License

Just another PHP implementation of PSR-7 - HTTP message interfaces

Install

Prefered way to install library is with composer:

composer require kambo/httpmessage

Usage

Server request

Creation of ServerRequest instance that encapsulates all data as it has arrived to the application from the CGI and/or PHP environment:

$enviroment    = new Enviroment($_SERVER, fopen('php://input', 'w+'), $_COOKIE, $_FILES);
$serverRequest = ServerRequestFactory::fromEnviroment($enviroment);

License

The MIT License (MIT), https://opensource.org/licenses/MIT