-
Notifications
You must be signed in to change notification settings - Fork 47
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
Allow for Pre-Configured HTTP Client and Basic Auth Changes #31
base: master
Are you sure you want to change the base?
Conversation
This change allows a user to provide a pre-configured HTTP Client to be used for managing connections to CA Agile Central. The is primarily useful in long running processes, such as code running inside of a container. This providers several benefits : 1. Connection reuse and simplified resource handling (can centralize connection creation and clean up only on shutdown rather than needing to explicitly close connections) 2. Connection Pooling Options 3. Client SSL Configuration Options -- Updated Basic Auth Client to always provide Basic Auth Crendetials to avoid blind duplicate calls. Since we know that all requests require authorization, we should always send the credentials.
Thanks for contributing back to this toolkit! I haven't had a chance to look all the way though it and/or test it yet, but I like the concept... |
Added bulk update to rally jar.
Added bulk update to rally jar.
UTF8 encoding issues.
JavaDoc issues.
https://github.com/rowlettc/RallyRestToolkitForJava # Conflicts: # .gitignore # pom.xml # src/main/java/com/rallydev/rest/RallyRestApi.java # src/main/java/com/rallydev/rest/client/BasicAuthClient.java # src/main/java/com/rallydev/rest/response/Response.java # src/test/java/com/rallydev/rest/RallyRestApiTest.java
Added BulkUserPermission capability and resolved race condition with multi-threaded httpclients
Resolved a race condition with BasicAuthClient when using Multi-threaded httpclients (while deprecated, I find myself using it a lot for testing in sandbox). Added Bulk User Permission capability. |
Anything I can do to help get this merged? I'm happy to close it too if it's not something CA wants to manage. I just have some other apps I want to investigate open sourcing, but they rely on a version of this jar with the modification. |
Wow, I'm embarrassed that it's been 8 months since the last activity. I apologize for not getting to this. Yes, I'd like to get this merged. It might be nice to batch a few changes up in one new release. Probably these two at a minimum:
Have you played at all with upgrading the version of the http components? |
No worries. I've been using a much newer version of HttpClient with this jar, as the LookBackAPI jar depended on a newer version and I often need to use both. The need to inject a newer version of the HttpClient was a motivation for exposing it. I can up the dependency, test, and investigate the reported bug if it will help move this forward. |
That would be amazing. The paren bug should be super quick to write a test and fix. What version of http client have you been using? |
I looked into upgrading httpclient version to 4.5.3. Looks like there were quite a few changes back in 4.3 when they moved constructing httpclient instances to a builder pattern and deprecated things like DefaultHttpClient and DecompressingHttpClient. So, a bit of work, but also probably dovetails nicely with your change since that's basically what you're trying to to- construct an httpclient instance and pass it in to this library. I'm going to take a stab at it as soon as I get a little free time. Would you be willing to help test the changes? |
Sure, happy to help. |
This change allows a user to provide a pre-configured HTTP Client to be
used for managing connections to CA Agile Central.
The is primarily useful in long running processes, such as code running
inside of a container. Further, it allows better control over the version HttpClient. For example, the LookBackAPIToolKit and RallyRestToolKit require different versions.
This providers several additional benefits :
connection creation and clean up only on shutdown rather than needing to
explicitly close connections)
--
Updated Basic Auth Client to always provide Basic Auth Crendetials to
avoid blind duplicate calls. Since we know that all requests require
authorization, we should always send the credentials.