Skip to content
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

[8.x] Add withUserAgent to HTTP client #34611

Merged
merged 1 commit into from
Sep 30, 2020
Merged

Conversation

jbrooksuk
Copy link
Member

No description provided.

@taylorotwell taylorotwell merged commit adbaf16 into 8.x Sep 30, 2020
@jbrooksuk jbrooksuk deleted the http-request-user-agent branch September 30, 2020 21:35
@julesjanssen
Copy link
Contributor

Currently, using this method appends the specified UserAgent string to the headers list. Calling this method twice will send a request with two User-Agent header lines. This is not accepted as valid by a lot of services.
Are you open to a PR which changes this behavior so that a call to withUserAgent overrides whatever the current value is?

@driesvints
Copy link
Member

@julesjanssen yes that makes sense. Feel free to PR that 👍

@driesvints
Copy link
Member

We're wondering if there are any headers that can be duplicated at all. Otherwise we could make the overwrite a standard behavior. But we have to be mindful not to break anything in a stable release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants