PHPackages                             gisostallenberg/response-content-negotiation-bundle - 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. [API Development](/categories/api)
4. /
5. gisostallenberg/response-content-negotiation-bundle

ActiveLibrary[API Development](/categories/api)

gisostallenberg/response-content-negotiation-bundle
===================================================

A bundle that allows creating various Response types from a controller, based on content negotiation

3.0.1(1mo ago)014.9k41MITPHPPHP ^8.1CI failing

Since Feb 4Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/gisostallenberg/response-content-negotiation-bundle)[ Packagist](https://packagist.org/packages/gisostallenberg/response-content-negotiation-bundle)[ RSS](/packages/gisostallenberg-response-content-negotiation-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (37)Versions (27)Used By (1)

[![Latest Stable Version](https://camo.githubusercontent.com/a40ece8335deb4c00de2e5f53cd38156f8c7d0f3c00f3638e4bb4b828d5c19cb/68747470733a2f2f706f7365722e707567782e6f72672f6769736f7374616c6c656e626572672f726573706f6e73652d636f6e74656e742d6e65676f74696174696f6e2d62756e646c652f762f737461626c65)](https://packagist.org/packages/gisostallenberg/response-content-negotiation-bundle)[![Latest Unstable Version](https://camo.githubusercontent.com/f69b625ba08f7daeeef42bc0a4e738e565163a56ba2b5bbd79ef12cf88454d6a/68747470733a2f2f706f7365722e707567782e6f72672f6769736f7374616c6c656e626572672f726573706f6e73652d636f6e74656e742d6e65676f74696174696f6e2d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/gisostallenberg/response-content-negotiation-bundle)[![Total Downloads](https://camo.githubusercontent.com/9b5d9ec9c948c1fcb19f1dade15701ae9036d385822fff1856978961b8f53bc8/68747470733a2f2f706f7365722e707567782e6f72672f6769736f7374616c6c656e626572672f726573706f6e73652d636f6e74656e742d6e65676f74696174696f6e2d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/gisostallenberg/response-content-negotiation-bundle)[![License](https://camo.githubusercontent.com/769e52ab32d22c75f4c7a89c734cbc133e66a980caa289698f10918e7597a410/68747470733a2f2f706f7365722e707567782e6f72672f6769736f7374616c6c656e626572672f726573706f6e73652d636f6e74656e742d6e65676f74696174696f6e2d62756e646c652f6c6963656e7365)](https://packagist.org/packages/gisostallenberg/response-content-negotiation-bundle)

Response Content Negotiation Bundle
===================================

[](#response-content-negotiation-bundle)

A bundle that allows creating various Response types from a controller, based on content negotiation

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

[](#installation)

```
composer require gisostallenberg/response-content-negotiation-bundle
```

Requirements
------------

[](#requirements)

### HTML

[](#html)

To render HTML the bundle requires [TwigBundle](https://github.com/symfony/twig-bundle).

### JSON &amp; XML

[](#json--xml)

To output JSON or XML the bundle requires [FOS Rest Bundle](https://github.com/FriendsOfSymfony/FOSRestBundle) and [JMS Serializer Bundle](https://github.com/schmittjoh/JMSSerializerBundle) or [Symfony Serializer](https://github.com/symfony/serializer)

Usage
-----

[](#usage)

```
