Preferred HTTP library: Req or HTTPoison?

Hi all,

I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison.

Req looks modern and composable, which is appealing. But, HTTPoison has been around for a long time and seems to be a battle-tested choice. I also noticed that HTTPoison has only one dependency which makes it attractive for keeping things lightweight.

I’d love to hear what the community prefers in 2025:

  • Which library do you use and why?
  • Any caveats, issues or limitations you’ve run into with either?

Thanks in advance!

You might want to read this deep-dive on the topic:

I also noticed that HTTPoison has only one dependency which makes it attractive for keeping things lightweight.

It may have only one direct dependency (:hackney), but :hackney itself comes with several dependencies (mentioned in the article above too).

3 Likes

Tesla is pretty underrated IMO, and it no longer “relies a bit too much on module-based configuration and meta-programming”, citied as downsides in that article.

3 Likes

Thank you for the article. I will go through it.

I’m curious why HTTPoison isn’t mentioned in this topic. Based on the download numbers on Hex, I assumed it was one of the most commonly used libraries. Am I missing something?

EDIT: Never mind, I missed the part where it mentions HTTPoison.

I would go with Req for new projects at this point. It has a wonderful API and buy-in from the right people, so we know it will be used and maintained. The only downside is it’s still not a stable release, but it’s been pretty stable for the last year or so now so I don’t expect any substantial breaking changes or anything at this point. I’ve personally switched over (I was previously rolling my own on top of Finch) and the batteries-included API is very nice.

Also: Req is a pure-Elixir stack underneath (Finch, Mint). Which doesn’t really matter but it’s cool!

3 Likes