Thanks to visit codestin.com
Credit goes to github.com

Skip to content

quimcalpe/psr7-response-sender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quimcalpe/psr7-response-sender

Version License Build Status

Sends PSR-7 Response compatible object's content and headers to browser.

Install

Via Composer

$ composer require quimcalpe/psr7-response-sender

Requirements

The following versions of PHP are supported by this version.

  • PHP 5.5
  • PHP 5.6
  • PHP 7
  • HHVM

Basic Usage

// 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);

Testing

$ vendor/bin/phpunit

License

The MIT License (MIT). Please see License File for more information.

About

Sends PSR-7 Response content and headers

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages