sunrise/http-message

Sunrise HTTP message wrapper for PHP 7.1+ based on RFC-7230, PSR-7 & PSR-17

v1.3.0 2020-04-13 02:39 UTC

README

Gitter Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads License

Awards

SymfonyInsight

Installation

composer require sunrise/http-message

How to use?

HTTP Request Message

use Sunrise\Http\Message\RequestFactory;

$message = (new RequestFactory)->createRequest('GET', 'http://php.net/');

// just use PSR-7 methods...

HTTP Response Message

use Sunrise\Http\Message\ResponseFactory;

$message = (new ResponseFactory)->createResponse(200, 'OK');

// just use PSR-7 methods...

Remaining PSR-7 packages

Test run

php vendor/bin/phpunit

Api documentation

https://phpdoc.fenric.ru/

Useful links