Closed c4710n closed 2 weeks ago
Hey there, sorry it took me this long to get to you; in the latest Tesla version, I removed all documents related to macros to discourage the use of macros without removal.
That means that you can pass any adapter using the strategy you wish to Tesla.client/2
I will close the PR; if some folks out there have some serious issue in production that such a feature is granted, please let me know; otherwise, I rather avoid adding even more features that may cause even more work for a v2 breaking change moment.
Thank you so much for your work regardless!
Thanks for all your hard works, Tesla already has great support on choosing adapter at different levels.
But, it still have one case that tesla doesn't support - override adapter at OTP app level.
This PR adds that feature, which is useful when we want to use different adapter for different OTP apps.
An example - I installed two packages from Hex:
foo
, whose OTP app name is:foo
, the underlying HTTP client is Teslabar
, whose OTP app name is:bar
, the underlying HTTP client is Tesla, too.I want to use
:finch
as the adapter for them all, but due to some reason, I have to set HTTP proxy forbar
. But,:finch
doesn't support proxy, for now. So I have to use:hackney
, which supports proxy.With this PR, I can do something like:
Feel free to comment. I can make any modifications necessary to ensure this PR is mergeable. ;)