You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #14786 [HttpClient] Clarification on use of base_uri + absolute paths (silverbackdan)
This PR was submitted for the 5.x branch but it was squashed and merged into the 4.4 branch instead.
Discussion
----------
[HttpClient] Clarification on use of base_uri + absolute paths
Related to symfony/symfony#39724
I've tried to word the note as best I can, but I thought it'd be nice to mention the importance and expected behaviour with trailing slashes on the base URI and prefixed slashed on the request path.
Commits
-------
c295662 [HttpClient] Clarification on use of base_uri + absolute paths
Copy file name to clipboardExpand all lines: http_client.rst
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -333,6 +333,10 @@ If you use for example
333
333
as the type and name of an argument, autowiring will inject the ``my_api.client``
334
334
service into your autowired classes.
335
335
336
+
.. note::
337
+
338
+
Pay attention to the trailing slashes in the `base_uri` parameter and prefixed slashes in your path when making a request. The URI will be merged following the rules explained in the [RFC 3986](https://www.ietf.org/rfc/rfc3986.txt) standard. [You can view some examples here](https://symfony.com/doc/current/reference/configuration/framework.html#base-uri)
0 commit comments