Skip to content

Add information to sub request #16561

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
Jan 18, 2024
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
5 changes: 5 additions & 0 deletions components/http_kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,11 @@ look like this::

.. _http-kernel-resource-locator:
Copy link
Contributor

Choose a reason for hiding this comment

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

this must be moved above the next Headline Locating Resources again

Copy link
Member

Choose a reason for hiding this comment

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

Done while merging. Thanks.


Also, note that by default, if the ``_format`` attribute is not set in your request, the value will be ``html``.
Copy link
Contributor

Choose a reason for hiding this comment

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

is this the best part to add such info notice for such _format ?

So, if your sub request returns something else than ``html`` (like json for instance) you can set it by setting the ``_format`` attribute on the request::

$request->attributes->set('_format', 'json');

Locating Resources
------------------

Expand Down