PHPackages                             phputil/httpwrapper - 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. phputil/httpwrapper

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

phputil/httpwrapper
===================

A simple PSR-7 wrapper for common responses.

1.1(9y ago)2515↓80%LGPL-3PHPPHP &gt;=5.2.0

Since Jun 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/thiagodp/httpwrapper)[ Packagist](https://packagist.org/packages/phputil/httpwrapper)[ Docs](http://github.com/thiagodp/httpwrapper)[ RSS](/packages/phputil-httpwrapper/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (3)Used By (0)

HTTP Wrapper
============

[](#http-wrapper)

This library provides a wrapper for the [PSR-7](http://www.php-fig.org/psr/psr-7/)'s `ResponseInterface`.

You have to use it with a library/framework that offers a [PSR-7](http://www.php-fig.org/psr/psr-7/) implementation, such as [Slim 3](http://www.slimframework.com/), [Guzzle](http://guzzlephp.org/), [Aura](https://github.com/auraphp/Aura.Router/tree/3.x#aurarouter) or [Zend](https://github.com/zendframework/zend-diactoros).

We use [semantic versioning](http://semver.org/). See our [releases](https://github.com/thiagodp/httpwrapper/releases).

Classes:

- [phputil\\HttpResponseWrapper](https://github.com/thiagodp/httpwrapper/blob/master/lib/HttpResponseWrapper.php)

Dependencies (installed automatically by `composer`):

- [phputil/http](https://github.com/thiagodp/http)
- [phputil/json](https://github.com/thiagodp/json)

### Installation

[](#installation)

```
composer require phputil/httpwrapper
```

### Example 1

[](#example-1)

Using with Slim 3:

```
