Thoughts on making dependencies adaptable?
Closed this issue · 2 comments
So, Poison and HTTPoison are dependancies - any thoughts on making those adaptable with behaviours? I noticed that the library still uses a pre-1.0 version of httpoison, and I couldn't help but wonder if the library really needs to be dependent on it all.
There's a lot of options for JSON decoders, Poison, Jason, Jiffy, etc. They all basically have the same interface, making that adaptable could be as simple as plugging in a module name as part of client configuration.
I think it'd be simple enough to do the same for HTTP functionality - a bit more complicated to write an adapter, though. But probably still fairly straightforward with everything being generated.
The biggest issue would be that all HTTP requests return the HTTPoison structs, rather than say, an AWS.Response
struct - changing that means a breaking change. That's... a harder pill to swallow.
I agree, in my project aws have a dependency conflict with neuron. neuron need poison 4.0 but aws need poison 3.1.
Closing in favor of PR :)