-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
[SCOPED CLIENTS][HEADERS] Overwritten or merged? #20569
Comments
Maybe you can try with a test command or so? |
I heard you, thanks For profiling reasons as we all know people use WebTestCase http_client, where we can enableProfiler But I don't wanna use WebTestCase http_client ( with static::createClient() ), cuz this client is not configurable with framework.http_client.scoped_clients configuration. |
Maybe I don't get it fully, but you can create a Symfony command inject your scoped client, and then doing a request with additional headers and then you can check which headers were sent. I'm not talking about integration, function or unit test case. I'm talking about manual testing to get the information first. |
I would think, the are merged and added if not present |
I got it... of course commands |
Currently (Symfony 7.2.2) it merges |
That is an incomprihensible moment in the documentation about headers from scoped_clients config and manually written headers. If I have some headers from scoped client config and when I use HttpClient service and call "request" and then put there some headers... I'm not sure what will be... either headers from scoped_clients will be overwritten by my manually passed ones or they will be merged with headers from the config.
The text was updated successfully, but these errors were encountered: