Sends PSR-7 Response compatible object's content and headers to browser.
Via Composer
$ composer require quimcalpe/psr7-response-senderThe following versions of PHP are supported by this version.
- PHP 5.5
- PHP 5.6
- PHP 7
- HHVM
// Require composer autoloader
require __DIR__ . '/vendor/autoload.php';
// $response must be Psr\Http\Message\ResponseInterface compatible
QuimCalpe\ResponseSender\send($response);With PHP 5.6 you can import the function straight away:
use function QuimCalpe\ResponseSender\send AS send_response;
send_response($response);$ vendor/bin/phpunitThe MIT License (MIT). Please see License File for more information.