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

Allow for Pre-Configured HTTP Client and Basic Auth Changes #31

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

rowlettc
Copy link

@rowlettc rowlettc commented Feb 24, 2017

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 :

  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.

e035214 added 3 commits February 24, 2017 13:45
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.
@krmorse
Copy link
Contributor

krmorse commented Mar 1, 2017

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...

e035214 and others added 8 commits March 24, 2017 14:10
Added bulk update to rally jar.
Added bulk update to rally jar.
UTF8 encoding 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
@rowlettc
Copy link
Author

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.

@rowlettc
Copy link
Author

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.

@krmorse
Copy link
Contributor

krmorse commented Nov 13, 2017

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?

@rowlettc
Copy link
Author

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.

@krmorse
Copy link
Contributor

krmorse commented Nov 14, 2017

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?

@krmorse
Copy link
Contributor

krmorse commented Nov 14, 2017

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?

@rowlettc
Copy link
Author

Sure, happy to help.

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