-
Notifications
You must be signed in to change notification settings - Fork 153
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
Apache httpclient5 support #33
base: master
Are you sure you want to change the base?
Conversation
Hi, thanks for your contribution! I have not maintained this repository in many years, but I see @simon04 has done so more recently -- do you have capacity to look at these changes Simon? |
Hi @simon04, do you think you could review these changes some day? Thanks much.. |
@kjozsa Is there any thought of adding support for the HttpAsyncClient5 as well? |
Hi all, I implemented full hcclient5 support, sync + async support are both ready now in my PR. Note that for the unit tests I needed to bump Mockito to v4 and JUnit to the latest 4.x. I aimed for minimal changes, but this required updating a few more classes around the codebase.. Please review my changes and accept my contribution if satisfied. |
This looks amazing. Thanks, @kjozsa. I hope one of the maintainers can look at this soon. |
import org.apache.hc.core5.http.ClassicHttpResponse; | ||
import org.apache.hc.core5.http.HttpEntity; | ||
import org.apache.hc.core5.http.Method; | ||
import org.apache.hc.core5.http.io.entity.EntityUtils; | ||
import org.apache.hc.core5.http.message.BasicHttpResponse; | ||
|
||
import java.io.IOException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import org.apache.hc.core5.http.ClassicHttpResponse; | |
import org.apache.hc.core5.http.HttpEntity; | |
import org.apache.hc.core5.http.Method; | |
import org.apache.hc.core5.http.io.entity.EntityUtils; | |
import org.apache.hc.core5.http.message.BasicHttpResponse; | |
import java.io.IOException; | |
import org.apache.hc.core5.http.Method; |
import java.io.ByteArrayInputStream; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.util.Arrays; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import java.util.Arrays; |
package oauth.signpost.commonshttp5.async; | ||
|
||
import org.apache.hc.client5.http.async.methods.SimpleHttpResponse; | ||
import org.apache.hc.core5.http.ClassicHttpResponse; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import org.apache.hc.core5.http.ClassicHttpResponse; |
|
||
public Map<String, String> getAllHeaders() { | ||
Header[] origHeaders = request.getHeaders(); | ||
HashMap<String, String> headers = new HashMap<String, String>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HashMap<String, String> headers = new HashMap<String, String>(); | |
HashMap<String, String> headers = new HashMap<>(); |
|
||
public Map<String, String> getAllHeaders() { | ||
Header[] origHeaders = request.getHeaders(); | ||
HashMap<String, String> headers = new HashMap<String, String>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HashMap<String, String> headers = new HashMap<String, String>(); | |
HashMap<String, String> headers = new HashMap<>(); |
How is update? HMAC-SHA1 will no longer be accepted as a signature method for TBA integrations. Before your account is upgraded to 2023.1, you must update your TBA integrations to use the HMAC-SHA256 signature method. |
I don't want to show up as the drama queen in this story, but my conclusion is that it's a waste of time. No repo owners showed up or has shown any sign of interest in merging that code, so it probably makes no sense to push more energies into this. |
Hi Matthias,
we are using hcclient5's ClassicHttpRequest in our project and I needed an OAuth1 lib badly.. The fastest way seemed to be adding support for this in SignPost. I cleared up my PR, I hope it makes into the base project!
Should you have any comments or change requests regarding this code, let's get in touch..
cheers,
Kristof