chulkilee
Here are the list of HTTP client libraries/wrappers, and some thoughts on HTTP client in general. I’d like to hear from others how they work with HTTP..
HTTP client libraries
- httpc — OTP 29.0.2 (inets 9.7.1) - erlang (part of OTP)
- GitHub - benoitc/hackney: simple HTTP client in Erlang · GitHub - erlang, socket pools
- GitHub - cmullaparthi/ibrowse: Erlang HTTP client · GitHub - erlang, pool/pipeline per destination
- GitHub - puzza007/katipo: HTTP2/HTTP3 client for Erlang based on libcurl and libevent · GitHub - erlang, libcurl
- GitHub - ninenines/gun: HTTP/1.1, HTTP/2, Websocket client (and more) for Erlang/OTP. · GitHub - erlang, HTTP/2, Websocket, keeping connection with supervisor
- GitHub - inaka/shotgun: For the times you need more than just a gun. · GitHub - erlang, on the top of gun, out-of-box support of Server-sent Events
HTTP Client Wrappers
- GitHub - elixir-tesla/tesla: The flexible HTTP client library for Elixir, with support for middleware and multiple adapters. · GitHub - elixir, support httpc, hackney, ibrowse
- GitHub - edgurgel/httpoison: Yet Another HTTP client for Elixir powered by hackney · GitHub - elixir, hackney
- GitHub - valpackett/httpotion: [Deprecated because ibrowse is not maintained] HTTP client for Elixir (use Tesla please) · GitHub - elixir, ibrowse
- GitHub - alexandrubagu/simplehttp: HTTP client for Elixir without dependencies · GitHub - elixir, httpc
Related links
- HTTP client libraries - need better one in standard library?
- Erlang httpc or Elixir third-party http libraries (httpoison, httppotion)?
Thoughts & Questions
- Although HTTP spec says headers are case-insensitive, http client libraries should not automatically downcase such values (especially for outgoing request) since there are applications require specific cases

- headers, form data, and query string should be a list not a map to preserve orders (both order of keys and order of values)
- For performance, what about using NIF to parse headers? For example, puma (app server in Ruby) uses C for this: puma/ext/puma_http11 at v3.12.0 · puma/puma · GitHub - such parser may be shared across client/server.
- How should HTTP libraries handle HTTP version upgrade?
- Should HTTP libraries make pure functional (zero side effect) or leverage more global states (connection pools, keeping connection, etc.)?
- For example, Tesla allows creating new client on the fly, so that it “builds” client without any configuration from “global” config; however as it may use HTTP client library (application) which maintains some state in it.
Trending in Discussions
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
Hi there! :wave:
@frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
New
Lately I’ve been thinking about how to organize components as a LiveView application grows. One of the pain points I’ve found (for myself...
New
What IDE or editor are you using for Elixir development?
Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
Other Trending Topics
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
In 2021 I started a new library called Tempo with the objective of modelling time as a set of intervals - not as instants. In 2022 I gave...
New
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
gregvaughn
In the meta-sense of the question, yeah, I’m not loving the fragmentation in http client libraries, however, it’s not a huge detriment to my day to day experience. I’d need to see some specific use cases to get behind some of your arguments about case and ordering, but it’s not a big deal because none of those things you’re advocating would work against any use case I’ve dealt with.
In the end, are you expecting someone else to write this ultra http client library, or are you trying to determine whether to write it yourself?
chulkilee
So far I’m happy with Tesla (with httpc and hackeny) for small traffic. However for future it would be nice if I can use one library for http2 and further so this is my part of research.
For ordering - some services require signature of headers so it is required to keep the order.
voughtdq
I was wondering if there was a library that leveraged libcurl, and there is! It’s actively maintained too. I’m going to give it a try later to see if it works.
dimitarvp
Why not do some code generation and make use of Elixir’s pattern matching, like so?
I am sure C code will be faster, however crossing the VM ↔ native barrier has an overhead as well. I have not measured the native approach but I would turn the question back to you: have you established with certainty that Elixir HTTP header parsing is a bottleneck in your workflow?
(EDIT: on a second thought, this is not practical if we want to accept all possible case combinations for the headers.)
BTW, awesome job compiling the list!

voughtdq
Good news and bad news for Katipo.
Bad news: It depends on a metrics library that is, as far as I can tell, out of date. It uses
merlto dynamically build a metrics module and it’s not getting through erl_lint on OTP 21.Good news: The metrics module can easily be faked so that there are no problems making requests.
Here’s the fake module:
chulkilee
I haven’t work with NIF, and I’m not arguing it’s a bottleneck.
However, as it may be called so many times, so even small improvement may give significant improvement (like JSON) in some cases. I guess it depends at which boundary NIF is used - for example, using NIF to parse each HTTP header may not worth it. However, we may overage NIF to take a stream (or string) of a HTTP response, and let it returns the whole parsed results - maybe less memory copying?
chulkilee
https://github.com/ericmj/xhttp
From ElixirConf 2018 keynote - see https://youtu.be/suOzNeMJXl0?t=2207
tangui
Question here: in your opinion should client HTTP libs optionally deal with response caching, i.e. dealing with the cache-control, pragma, expires, etc. headers, and cache the response automatically? Or should it better be done by the application?
There’s for example that HTTPoison issue from 2 years ago. Not sure if it’d be a sane approach.
chulkilee
All libs should have “minimal” default behavior. I don’t think HTTP cache or auto-retry for idempotent requests should be turned on by default.
A good library is extensible (like Elixir), not full-featured. That’s why Tesla is my current choice of HTTP wrapper.
Note that httpc does not verify certificate by default
voltone
Neither do ibrowse, HTTPotion, gun, Tesla and SimpleHttp. And neither do hackney and HTTPoison if you pass any custom SSL options (e.g. select a custom CA, or suppress log messages with
log_alert: false) without also passingverify: :verify_peeralong with the rightverify_fun…