Closed richard-vanneck closed 4 years ago
Thanks for opening this pull request, @richard-vanneck! I want to make sure I understand the use-case here. Is there something specific you're looking to customize for http connections?
We would like to overwrite the "Http" class with our own "CustomHttp" class which extends the "Http" class.
This custom class would implement a "org.apache.http" implementation. Apache gives us better control over connections such as connection pooling. We also would like to add metrics and tracing to the http requests. Finally it gives us consistency over every http request we make outside of Braintree requests.
Regards Richard Vanneck
This is not something we are going to support at this time. If this is necessary for your business, you are free to fork the library and make this change.
Another option, if it supports everything y'all need to do in your integration, is to use the GraphQL API instead of the server sdk: https://graphql.braintreepayments.com/
Summary
http
setter toBraintreeGateway
This allows for a custom http implementation. A custom implementation gives us more control over how http client connections are handled.
Checklist
mvn verify -DskipITs
)