fidr

fidr

Peppermint - Easy to use process-less HTTP client build on Mint

Peppermint (Docs)

I build an easy-to-use process-less HTTP client build on Mint. It should cover the basic needs, without needing to deep-dive into Mint itself.

Some examples:

GET

{:ok, %{status: 200, headers: headers, body: body}} =
  Peppermint.get("http://httpbin.org/get?foo=bar")

POST

{:ok, %{status: 200, headers: headers, body: body}} =
  Peppermint.post("http://httpbin.org/post", params: %{foo: "bar"})

POST JSON

{:ok, %{status: 200, headers: headers, body: body}} =
  Peppermint.post("http://httpbin.org/post",
    headers: [{"Content-Type", "application/json"}],
    body: Jason.encode!(%{foo: "bar"})
  )

Check the docs for more info.

I’m open to suggestions and feature requests, although I do try to keep it simple.

Let me know what you think!

First Post!

lalo2302

lalo2302

Amazing and simple. Thanks for contributing!

Maybe a noob question. But why would I prefer a pool-less library rather than a process based like HTTPoison?

The only one I can think of is for not blocking requests.

Most Liked

fidr

fidr

Not a noob question at all. I find that I don’t need a pool for most of my use cases. If I do need one, I’d rather handle it myself.

A pool helps when you need to do multiple subsequent requests to the same host. You could spawn a new process for each request, but then you might overload the target with too many connections. A pool will limit the amount of connections to a single host and reuse connections to optimise throughput.

HTTPoison / hackney is actually pretty nice. It will keep a single connection open and re-use it for next requests. I just prefer Mint over hackney because of stability and correct SSL handling.

kodepett

kodepett

Awesome library, I find myself making a one off request to an upstream server, most of the http clients maintained a connection pool to the server after the initial request which was unnecessary in this context.
Mint was too low level, I just stumbled across this library.

One reason to prefer a process-less over a process base will be the overhead of copying the response.

Thank you for the great work.

Where Next?

Trending in Announcing Top

bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
385 14863 120
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
shahryarjb
The Chelekom project is a library of Phoenix and LiveView components generated via Mix tasks to fit developer needs seamlessly. One of i...
New
kip
Following on from my CLDR lbraries I started work on Unicode transforms. But like everything related to CLDR there is a lot of yak-shavin...
New
anuaralfetahe
Hello Published a new library - ProcessHub! ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
webofbits
Squid Mesh is an open source workflow automation runtime for Elixir applications. It is aimed at Phoenix and OTP apps that want to defin...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
kip
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

We're in Beta

About us Mission Statement