Skip to content

Commit 7ffd68e

Browse files
committed
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
2 parents 1c090ab + c295662 commit 7ffd68e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

http_client.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,10 @@ If you use for example
333333
as the type and name of an argument, autowiring will inject the ``my_api.client``
334334
service into your autowired classes.
335335

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)
339+
336340
Making Requests
337341
---------------
338342

0 commit comments

Comments
 (0)