PHPackages                             binsoul/net-http-response - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. binsoul/net-http-response

ActiveLibrary[HTTP &amp; Networking](/categories/http)

binsoul/net-http-response
=========================

Specialized response and body classes plus response emitter

026PHP

Since Apr 27Pushed 10y ago1 watchersCompare

[ Source](https://github.com/binsoul/net-http-response)[ Packagist](https://packagist.org/packages/binsoul/net-http-response)[ RSS](/packages/binsoul-net-http-response/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

net-http-response
=================

[](#net-http-response)

[![Latest Version on Packagist](https://camo.githubusercontent.com/20d6e74a7bf2b808beabf6bfcf37881f141f0906ddc59f1fb0c9c26b9a9b0bf1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62696e736f756c2f6e65742d687474702d726573706f6e73652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/binsoul/net-http-response)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/c7893f6dc12dbca9fb3b3d873270ac4470c157f9b5385a5481a9ef85d37fc837/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62696e736f756c2f6e65742d687474702d726573706f6e73652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/binsoul/net-http-response)

Install
-------

[](#install)

Via composer:

```
$ composer require binsoul/net-http-response
```

This package provides PSR-7 ResponseInterface compatible response classes specialized for known HTTP status codes and body implementations which extend the PSR-7 StreamInterface with some useful methods. The included response emitter can output responses to different target environments.

Usage
-----

[](#usage)

Output a text response on a web server:

```
