Closed patrickkusebauch closed 4 years ago
👋 @patrickkusebauch thanks for reaching out. We've talked this over internally, and we're going to pass on this request - it introduces a support burden that we're not willing to take on, plus folks can continue to use responses as they are for logging/analytics of requests.
This said, you're 💯 welcome to fork our repo and make the changes you need.
Hello @patrickkusebauch, have you found a solution to overcome this?
Same issue: https://github.com/braintree/braintree_php/issues/141
Looks like reasons not to implement this are no longer valid for this day.
My team has a need for a custom HTTP client. Wondering if anyone can reconsider?
General information
Issue description
Setup
Currently, we are forced into using the included HTTP client implementation. Example from
SubscriptionGateway
classThis HTTP class cannot be switched, since it is created directly in the class and not passed as a dependency.
This
HTTP
class, in turn, createsCurlRequest
class that is again hardcoded and cannot be swapped by any means:This
CurlRequest
class callscurl_*
methods directly and therefore there is no way to alter/add any further code.Why change?
Because right now there is no possibility for any type of logging, analytics, and metrics for the requests. I cannot track any information about the CURL requests themselves, at best, I can wrap the library code itself, but that gives me only very little information in contrast to what
curl_getinfo
can give you about the request.