-
Notifications
You must be signed in to change notification settings - Fork 324
Add functionality to tag every http request #1015
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
Conversation
|
|
|
Can you explain the business case for this? |
|
Business case for this is to allow users to add some custom http header which can be used for web requests analysis tools (Dynatrace). For example you have multiple running processes in your application and every process creates it own instance of CloudFoundryClient and executes web requests to the controller. You can set correlation id which can be used to identify which process sends request and use it as filter to generate statistics. |
|
Hello @twoseat , |
|
@theghost5800 There is a non-intuitive way to reuse the expensive resources in a ConnectionContext cc1 = DefaultConnectionContext.builder()
.apiHost("test-host")
.build();
ConnectionContext cc2 = DefaultConnectionContext.builder()
.httpClient(cc1.getHttpClient())
.build();That being said, you shouldn't do this. Conceptually, the design of the Java Client is much like the design of Hibernate; the I believe that the proper design is to add, to all |
This feature allows to include custom http headers in every http requests using map
2ddca62 to
cae88b8
Compare
|
I did some refactoring and move out custom http headers from ConnectionContext into client |
|
Any updates about my PR? |
Previously, there was no way to add custom HTTP headers to requests made by the client. This change adds configuration options to include a custom header in all the requests made by a client. [#1015] Signed-off-by: Ben Hale <[email protected]>
|
@theghost5800 Please grab the latest snapshots and give them a work out. If your use-case is satisfied, we'll cut a release. |
|
@nebhale Thank you for meging this feature in your repo. I will test it and write you back if it everything okay to release it. |
|
Hi @theghost5800 - I'm prepping a release for tomorrow, so if you have any objection to this fix please let me know now! |
|
Hi @twoseat , Everythings looks fine. Thank you for including this feature in your project. |

This feature allows to include custom http headers in every http
requests using map