@@ -11,9 +11,9 @@ in the response (accept listener).
1111
1212With this in mind we now turn to explain each one of them.
1313
14- All listeners except the ``mime_type `` one are disabled by default. You can
15- enable one or more of these listeners. For example, below you can see how to
16- enable all listeners:
14+ All listeners except the ``mime_type `` listener are disabled by default. You
15+ can enable one or more of these listeners. For example, below you can see how
16+ to enable a few additional listeners:
1717
1818.. code-block :: yaml
1919
@@ -25,8 +25,8 @@ enable all listeners:
2525 view :
2626 view_response_listener : ' force'
2727
28- 3.1 View Response listener
29- --------------------------
28+ View Response Listener
29+ ----------------------
3030
3131The view response listener makes it possible to simply return a ``View ``
3232instance from action controllers. The final output will then automatically be
@@ -36,19 +36,19 @@ This requires adding the `SensioFrameworkExtraBundle`_ to your vendors.
3636
3737For details see :doc: `View Response Listener <view_response_listener >`.
3838
39- 3.2 Body listener
40- -----------------
39+ Body Listener
40+ -------------
4141
4242The Request body listener makes it possible to decode the contents of a request
43- in order to populate the "request" parameter bag of the Request. This for
44- example allows to receive data that normally would be sent via POST as
43+ in order to populate the "request" parameter bag of the Request. This, for
44+ example, allows to receive data that normally would be sent via POST as
4545``application/x-www-form-urlencode `` in a different format (for example
4646application/json) in a PUT.
4747
4848For details see :doc: `Body Listener <body_listener >`.
4949
50- 3.3 Request Body Converter Listener
51- -----------------------------------
50+ Request Body Converter Listener
51+ -------------------------------
5252
5353`ParamConverters `_ are a way to populate objects and inject them as controller
5454method arguments. The Request body converter makes it possible to deserialize
@@ -59,18 +59,18 @@ and have the converters enabled.
5959
6060For details see :doc: `Request Body Converter Listener <request_body_converter_listener >`.
6161
62- 3.4 Format listener
63- -------------------
62+ Format Listener
63+ ---------------
6464
6565The Request format listener attempts to determine the best format for the
66- request based on the Request's Accept-Header and the format priority
66+ for the request based on the HTTP Accept header and the format priority
6767configuration. This way it becomes possible to leverage Accept-Headers to
6868determine the request format, rather than a file extension (like foo.json).
6969
7070For details see :doc: `Format Listener <format_listener >`.
7171
72- 3.5 Mime type listener
73- ----------------------
72+ Mime Type Listener
73+ ------------------
7474
7575This listener allows registering additional mime types in the ``Request ``
7676class. It works similar to the `mime type listener `_ available in Symfony
@@ -83,16 +83,16 @@ since 2.5.
8383 view :
8484 mime_types : {'jsonp': ['application/javascript+jsonp']}
8585
86- 3.6 Param Fetcher listener
87- --------------------------
86+ Param Fetcher Listener
87+ ----------------------
8888
8989The param fetcher listener simply sets the ParamFetcher instance as a request attribute
9090configured for the matched controller so that the user does not need to do this manually.
9191
92- For details see :doc: `Param Fetcher <param_fetcher_listener >`.
92+ For details see :doc: `Param Fetcher Listener <param_fetcher_listener >`.
9393
94- 3.7 Allowed Http Methods Listener
95- ---------------------------------
94+ Allowed Http Methods Listener
95+ -----------------------------
9696
9797This listener adds the ``Allow `` HTTP header to each request appending all
9898allowed methods for a given resource.
@@ -121,8 +121,8 @@ You need to enable this listener as follows, as it is disabled by default:
121121 fos_rest :
122122 allowed_methods_listener : true
123123
124- 3.8 Security Exception Listener
125- -------------------------------
124+ Security Exception Listener
125+ ---------------------------
126126
127127By default it is the responsibility of firewall access points to deal with
128128AccessDeniedExceptions. For example the ``form `` entry point will redirect to
0 commit comments