Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[HttpFoundation] Add doc for Request::getContent() method #3610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 9, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions 12 components/http_foundation/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,22 @@ argument::

.. _component-foundation-attributes:

Finally, you can also store additional data in the request,
thanks to the public ``attributes`` property, which is also an instance of
Thanks to the public ``attributes`` property, you can store additional data
in the request, which is also an instance of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add italics around also - *also*. The reason is that we use also twice in this sentence - when I add the italics, I read the second in my head differently, so it doesn't sound bad. Or we could remove one of the "also"s :).

:class:`Symfony\\Component\\HttpFoundation\\ParameterBag`. This is mostly used
to attach information that belongs to the Request and that needs to be
accessed from many different points in your application. For information
on how this is used in the Symfony2 framework, see
:ref:`the Symfony2 book <book-fundamentals-attributes>`.

Finally, the raw data sent with the request body can be accessed using
:method:`Symfony\\Component\\HttpFoundation\\Request::getContent()`::

$content = $request->getContent();

For instance, this may be useful to process a JSON string sent to the
application by a remote service using the HTTP POST method.

Identifying a Request
~~~~~~~~~~~~~~~~~~~~~

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.