There was an error while loading. Please reload this page.
1 parent cf68425 commit 54f77d8Copy full SHA for 54f77d8
reference/events.rst
@@ -215,10 +215,12 @@ and set a new ``Exception`` object, or do nothing::
215
response won't work. If you want to overwrite the status code (which you
216
should not without a good reason), set the ``X-Status-Code`` header::
217
218
- $response = Response(
+ $response = new Response(
219
'Error',
220
- 404 // ignored,
221
- array('X-Status-Code' => 200)
+ 404, // this status code will be ignored
+ array(
222
+ 'X-Status-Code' => 200 // this status code will actually be sent to the client
223
+ )
224
);
225
226
.. seealso::
0 commit comments