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

Expose Client Configuration in API Factory and prevent user agent being overridden #155

Closed
wants to merge 8 commits into from

Conversation

fgoncalves
Copy link
Contributor

We do a lot of client identification based on user agent in our api requests. Unfortunately the sdk was overriding this.

This PR prevents this so that if there's a parameter present in the client interface that sets the user agent, then we don't override it. In other words, if an interface is defined as such:

    SomeObject get(@Parameter(name = "User-Agent", location = "header") String userAgent);

Then the user agent is not overridden.

The PR also exposes the ClientConfiguration in the ApiClientFactory to allow for higher flexibility. In our use case we use it to set the user agent for all clients by default and have the above way to specify it per call.

I'm not sure how to handle versioning here, let me know if you'd like me to bump it.

@laurens
Copy link

laurens commented Jun 23, 2016

thanks, lgtm +1

Fred and others added 3 commits June 23, 2016 12:14
@fgoncalves
Copy link
Contributor Author

I'm closing this PR so I can separate the 2 features in 2 prs

@fgoncalves fgoncalves closed this Jun 23, 2016
@laurens
Copy link

laurens commented Jun 27, 2016

This PR has been split into two distinct feature changes: #158 and #159

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.

2 participants