8000 minor #9669 Mentioned the new feature to pass custom HTTP headers whe… · symfony/symfony-docs@1abac5c · GitHub
[go: up one dir, main page]

Skip to content

Commit 1abac5c

Browse files
committed
minor #9669 Mentioned the new feature to pass custom HTTP headers when submiting forms (javiereguiluz)
This PR was squashed before being merged into the master branch (closes #9669). Discussion ---------- Mentioned the new feature to pass custom HTTP headers when submiting forms This fixes #9656. Commits ------- 6776a35 Mentioned the new feature to pass custom HTTP headers when submiting forms
2 parents c61c5ff + 6776a35 commit 1abac5c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

testing.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,16 @@ their type::
749749
PHP format (it converts the keys with square brackets notation - e.g.
750750
``my_form[subject]`` - to PHP arrays).
751751

752+
.. tip::
753+
754+
The ``submit()`` method defines a third optional argument to add custom
755+
HTTP headers when submitting the form::
756+
757+
$client->submit($form, array(), array('HTTP_ACCEPT_LANGUAGE' => 'es'));
758+
759+
.. versionadded:: 4.1
760+
The feature to add custom HTTP headers was introduced in Symfony 4.1.
761+
752762
Adding and Removing Forms to a Collection
753763
.........................................
754764

0 commit comments

Comments
 (0)
0