PHPackages                             slim/http - 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. [Framework](/categories/framework)
4. /
5. slim/http

ActiveLibrary[Framework](/categories/framework)

slim/http
=========

Slim PSR-7 Object Decorators

1.4.0(1y ago)1502.3M↑11.8%45[6 issues](https://github.com/slimphp/Slim-Http/issues)[4 PRs](https://github.com/slimphp/Slim-Http/pulls)20MITPHPPHP ^8.0CI passing

Since Dec 23Pushed 4mo ago11 watchersCompare

[ Source](https://github.com/slimphp/Slim-Http)[ Packagist](https://packagist.org/packages/slim/http)[ Docs](http://slimframework.com)[ RSS](/packages/slim-http/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (22)Used By (20)

Slim-Http
=========

[](#slim-http)

Slim PSR-7 Object Decorators

[![Build Status](https://github.com/slimphp/Slim-Http/workflows/Tests/badge.svg?branch=master)](https://github.com/slimphp/Slim-Http/actions?query=branch:master)[![Coverage Status](https://camo.githubusercontent.com/54309903b45c9c2df85716013c1b0f4deef18420f58375a44423bead5bd474fb/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f736c696d7068702f536c696d2d487474702f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/slimphp/Slim-Http?branch=master)[![Total Downloads](https://camo.githubusercontent.com/930cf70faa4ea14f1218becd274e147033c571a588d221af715270894ef0ef9b/68747470733a2f2f706f7365722e707567782e6f72672f736c696d2f687474702f646f776e6c6f616473)](https://packagist.org/packages/slim/http)[![License](https://camo.githubusercontent.com/275734a932665031bc31dcdcd95363f204934ce75865a0957bd39ecb2044fb4a/68747470733a2f2f706f7365722e707567782e6f72672f736c696d2f687474702f6c6963656e7365)](https://packagist.org/packages/slim/http)

Installation
------------

[](#installation)

It's recommended that you use [Composer](https://getcomposer.org/) to install this library.

```
$ composer require slim/http
```

This will install the `slim/http` component and all required dependencies. PHP 7.4, or newer, is required.

Tests
-----

[](#tests)

To execute the test suite, you'll need to install all development dependencies.

```
$ git clone https://github.com/slimphp/Slim-Http
$ composer install
$ composer test
```

Usage
-----

[](#usage)

The Decoration Repo Provides 3 Factories which instantiate the Decorators. They respectively return PSR-7 Compatible Interfaces.

- `DecoratedResponseFactory`
- `DecoratedServerRequestFactory`
- `DecoratedUriFactory`

Example for Instantiating a Decorated Nyholm/Psr7 Response
----------------------------------------------------------

[](#example-for-instantiating-a-decorated-nyholmpsr7-response)

```
