Support custom Mint transports
dannote opened this issue · comments
Hi!
Mint natively (and silently) supports custom transports by accepting a module implementing Mint.Core.Transport
behaviour:
Mint.HTTP.connect(My.Custom.Module, "example.com", 80)
Although it's an undocumented (yet) feature, it works seamlessly. It would be great if Finch pools also accepted a tuple in the form of {module, host, port}
. I saw the ongoing conversation about the UNIX socket (#139); this might be related.
@dannote Agreed, I think we should be able to solve both of these cases with the same solution.
Custom transports are not officially supported by Mint so I am not sure that we should try to add this feature that depends on a private API, see: elixir-mint/mint#323
Oh good call @sneako. I hadn't realized that was private. Agreed that we shouldn't support a feature that is based on Mint's private API.