-
Notifications
You must be signed in to change notification settings - Fork 78
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
feat!: Upgrading java-http-client to use apache httpclient5 #148
base: main
Are you sure you want to change the base?
feat!: Upgrading java-http-client to use apache httpclient5 #148
Conversation
sendgrid-java is currently incompatible with apache httpclient5 due to it's dependency on this simplified version of the http client. In order for projects on httpclient5 to use sendgrid-java, this dependency needs to be updated first.
I used the official Apache guide for the migration: https://hc.apache.org/httpcomponents-client-5.3.x/migration-guide/migration-to-classic.html, as well as other resources like some of the namespace mappings from here: https://docs.openrewrite.org/recipes/apache/httpclient5/upgradeapachehttpclient_5_classmapping. |
throw ex; | ||
} | ||
uri = buildUri(request.getBaseUri(), request.getEndpoint(), request.getQueryParams()); | ||
httpGet = new HttpGet(uri.toString()); |
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.
You can even move the declaration and assignment to the same line, to merge line 170 with 173. The same is valid for the other methods: post, patch, put below.. etc.
Looking good, for the rest. 👍🏻
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.
Thanks, fixed!
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.
Looking good to me! (I am not a maintainer on this project btw). Hopefully it gets merged and approved by others as well.
My suggestion for this PR would be to release it under a new major version, such that it is clear that it is a breaking change for consumers. Then we can also update |
Opened a linking issue in the main repo to hopefully make this more visible: sendgrid/sendgrid-java#772 |
Fixes #147
sendgrid-java, specifically the constructor that consumes a
Client
is currently incompatible with apache httpclient5 due to it's dependency on this repository, a simplified version of the http client. In order for projects on httpclient5 to use sendgrid-java, this dependency needs to be updated first.Checklist
If you have questions, please file a support ticket, or create a GitHub Issue in this repository.