Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on the ticket I created:
#1016
I implemented this integration of Apache HttpClient 5.1 for Scribe. My code is more or less a copy of the existing HttpClient 4.x implementation (https://github.com/scribejava/scribejava/tree/master/scribejava-httpclient-apache) with the necessary modifications to dependencies and the package structure that changed with httpclient5.
What I am not 100% sure about, is the whole asynchronous stuff from HttpClient as I primarily have experience with the synchronous API. The whole asynchronous API in HttpClient 5 doesn't seem to be using the same approach anymore as before with the HttpResponse containing also the HttpEntity/InputStream. But there are some compatibilty classes available, so that's why I choose to stay as close to the previous implementation as possible, especially since the Scribe API primarily is using InputStream.
I used and tested the same implementation also in our project, but as I just implemented it, I don't yet have any experience over a longer period of usage.