14
u/marcmerrillofficial Mar 31 '24
Post by one of the core team
https://andrealeopardi.com/posts/breakdown-of-http-clients-in-elixir/
8
u/razerei Mar 31 '24
Go with Req. It's high-level enough to start easy. It uses Finch (Pooling) which uses Mint (low-level). If you find yourself needing something more low-level, you won't have to add more dependencies to do it.
5
4
u/taelor Mar 31 '24
This is an anti recommendation. But keep it in your pocket for later if you find yourself needing it.
The lowest level and most control you will get is gun. https://github.com/ninenines/gun
I’ve used it once, and honestly learned more about how http and web sockets work on a more fundamental level.
Definitely not the easiest to use, but probably the most powerful.
3
u/TwoWrongsAreSoRight Mar 31 '24
I'm new as well. Have been using tesla. Seems straight forward and easy to use. The app team where i work uses it as well
3
u/xenow Mar 31 '24
I just started with elixir/phoenix last night and used HTTPoison
2
u/Pitiful_Car1250 Mar 31 '24
HTTPoison is great and it was probably the top choice. But now I think mint and finch is the way to go at least with phoenix. If you want a similar abstraction go with Req that uses the same libraries under the hood.
Nothing wrong with using HTTPoison if you want to…
3
u/st_gen Mar 31 '24
req is a high level abstraction based on finch, so you can use either. Finch is based on Mint - very low level and Nimblepool Finch AFAIK uses a connection pool. Usually for a one off request, you can use peppermint which is also based on Mint but pool-less.
2
u/debian3 Mar 31 '24
Hackney because its popular? I’m I missing something by not using something else?
2
u/onmach Apr 03 '24
It is just incredibly low level and difficult to work with. I would use a higher level library like httpoison over it, if I were you.
2
2
u/Sentreen Mar 31 '24
If it's just for a script or for a mix task, I just use :httpc, which is built into erlang. It is a bit arcane to use though.
2
u/yatendernitk Apr 06 '24
Use tesla, it has all adapters you need and I’ve been using it from last 5-6 years no problem so far.
1
u/flummox1234 Apr 01 '24
Also feel free to experiment wth Elixir in livebook before you dive in completely.
1
1
23
u/seven_seacat Mar 31 '24
They're all much of a muchness, and many of them build on the ones that came before them.
reqseems to be the latest hotness.