TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Mint, a new HTTP library for Elixir

275 pointsby jpariseover 6 years ago

14 comments

gamacheover 6 years ago
Fantastic! Congrats on the release, Eric and Andrea!<p>For Elixir devs who want a higher-level interface to Mint, check out Mojito: <a href="https:&#x2F;&#x2F;hexdocs.pm&#x2F;mojito&#x2F;Mojito.html" rel="nofollow">https:&#x2F;&#x2F;hexdocs.pm&#x2F;mojito&#x2F;Mojito.html</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;appcues&#x2F;mojito" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;appcues&#x2F;mojito</a><p>It builds on Mint to offer one-off requests, connection pooling, and a generally friendlier interface than playing telephone with a TCP socket. :) Play around and let me know how it goes!
ramchipover 6 years ago
I like that Mint keeps dependencies to a minimum. I wanted to use the Gun client in the past, but couldn’t because Gun and Cowboy would depend on different versions of Cowlib (this is less of a problem now that Cowboy 2 is well supported in Phoenix). Instead I used HTTPoison, but the way it wraps Hackney makes it a bit annoying to understand and debug, and the pooling can cause problem.<p>Mint looks lower level, but with a clean, well-documented API which should be a great building block in the future. Congrats Eric and Andrea!
skrebbelover 6 years ago
It took me a while to figure out whether this is an HTTP client library or a server library. Turns out it is the former. Nice! I like that it&#x27;s in-process. I wish more Elixir libraries would default to such a design.<p>(EDIT: I had accidentally written &quot;latter&quot; instead of &quot;former&quot; above, causing a bunch of people to correct me, thanks for that)
评论 #19248230 未加载
评论 #19248045 未加载
评论 #19248109 未加载
评论 #19249364 未加载
评论 #19248567 未加载
eternal_virginover 6 years ago
While I have qualms about the name since this is like the 20th Mint I&#x27;ve heard of now, I&#x27;m incredibly excited as to what this has to offer. The control over the underlying process is key to creating beautifully asynchronous applications, and it gives me a lot of node-got vibes in terms of how easy it is to use.<p>And thank god, HTTPS support built in... it never ceases to amaze me why some HTTP libs don&#x27;t have TLS as a given.
评论 #19248295 未加载
评论 #19248447 未加载
评论 #19249375 未加载
mrdoopsover 6 years ago
I&#x27;m liking the trend of designing runtime-behaviour agnostic libraries in Elixir. We get such powerful runtime capabilities with OTP, but indulged in the wrong context our cool OTP processes can be imposing assumptions onto our users.<p>I&#x27;d like to see some kind of generic HTTP contract or REST-API client builder library next so we can have swappable HTTP adapters (e.g. Mint&#x2F;Hackney). I don&#x27;t want to depend on a library like HTTPoison or Tesla directly when making a client, instead just generic Request&#x2F;Response structs or protocols. That way an internal project can use a single HTTP adapter across all REST integrations rather than whatever the library author chose to use.
评论 #19257782 未加载
Dirlewangerover 6 years ago
What does Mint provide over, say, HTTPoison? Still can&#x27;t quite grok what it&#x27;s offers.
评论 #19249594 未加载
评论 #19248319 未加载
kt315_over 6 years ago
What is the advantage over Gun? (<a href="https:&#x2F;&#x2F;ninenines.eu&#x2F;docs&#x2F;en&#x2F;gun&#x2F;1.3&#x2F;manual&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ninenines.eu&#x2F;docs&#x2F;en&#x2F;gun&#x2F;1.3&#x2F;manual&#x2F;</a>)
评论 #19248401 未加载
etxmover 6 years ago
I wish a solid HTTP client and JSON library was a part of the std lib. I feel like all of my apps have HTTPotion, HTTPoison, Poison, and Jason as dependencies.
sysashiover 6 years ago
this library was renamed from xhttp to mint and new name is much more refreshing :)<p>I&#x27;m excited to try out this library (or something built on top of it)! In my day to day work I use hackney, it&#x27;s an awesome lib, but sometimes I struggle with documentation.
KhoomeiKover 6 years ago
A lightweight serverside Elixir framework like this is exactly what I was looking for earlier this week. Phoenix is really clunky in my opinion and pretty foreign (Ruby&#x2F;Rails-like) coming from a lightweight Flask&#x2F;Express&#x2F;Go background.
评论 #19248293 未加载
评论 #19248311 未加载
评论 #19248631 未加载
评论 #19248551 未加载
评论 #19248800 未加载
dnauticsover 6 years ago
looking at the library, one of the exciting things (for me) is the existence of stream_request_body. AFAICT there isn&#x27;t an obvious way to do this in any of the other libraries.
alexgaribayover 6 years ago
Admins: Can we get the title updated to the actual article&#x27;s page title to avoid some confusion?<p>&quot;Mint, a new HTTP client for Elixir&quot;
chooseanameover 6 years ago
Is it me or are we running out of names for things?
评论 #19249340 未加载
评论 #19248292 未加载
评论 #19249387 未加载
评论 #19248225 未加载
ProAmover 6 years ago
People are the worst at naming products. Why call it Mint when there is already an insanely popular Mint.com financial software. It makes Googling&#x2F;searching for product relevancy near impossible. It&#x27;s like try to search for Firefox on Android vs Firefox on a desktop information.
评论 #19248084 未加载
评论 #19248064 未加载
评论 #19248155 未加载