braintree / braintree_java

Braintree Java library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
158 stars 99 forks source link

Feature/enable custom http #78

Closed richard-vanneck closed 4 years ago

richard-vanneck commented 4 years ago

Summary

This allows for a custom http implementation. A custom implementation gives us more control over how http client connections are handled.

Checklist

sestevens commented 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?

richard-vanneck commented 4 years ago

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

crookedneighbor commented 4 years ago

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.

crookedneighbor commented 4 years ago

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/