Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Mint - Disrupting HTTP clients
Search
Andrea Leopardi
August 29, 2019
Programming
300
0
Share
Mint - Disrupting HTTP clients
Andrea Leopardi
August 29, 2019
More Decks by Andrea Leopardi
See All by Andrea Leopardi
Agentic Elixir
whatyouhide
0
450
The Umbrella and the Range
whatyouhide
0
60
gen_statem - OTP's Unsung Hero
whatyouhide
2
330
The World is a Network (and We Are Just Nodes)
whatyouhide
1
250
BEAM: The Perfect Fit for Networks
whatyouhide
1
260
Update from the Elixir team - 2022
whatyouhide
0
460
Testing Asynchronous OTP
whatyouhide
1
580
Elixir Sightseeing Tour
whatyouhide
0
480
BEAM Architecture Handbook
whatyouhide
7
3k
Other Decks in Programming
See All in Programming
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
140
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
160
PHPer、Cloudflare に引っ越す
suguruooki
1
150
エラー処理の温故知新 / history of error handling technic
ryotanakaya
7
1.9k
From Formal Specification to Property Based Test
ohbarye
0
2.4k
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
2.7k
Back to the roots of date
jinroq
0
790
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
770
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
350
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
690
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
200
[RubyKaigi 2026] Require Hooks
palkan
1
310
Featured
See All Featured
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
280
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
210
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Bash Introduction
62gerente
615
210k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
500
The Spectacular Lies of Maps
axbom
PRO
1
740
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
Context Engineering - Making Every Token Count
addyosmani
9
870
4 Signs Your Business is Dying
shpigford
187
22k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
250
Transcript
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
{:ok, conn} = Mint.HTTP.connect( :https, "example.com", 80 ) conn #=>
%Mint.HTTP1{...}
{:ok, conn, request_ref} = Mint.HTTP.request( conn, "GET", "/", [{"content-type", "text/html"}]
)
None
{:ok, conn, request_ref} = Mint.HTTP.request(...)
None
None
None
receive do message -> Mint.HTTP.stream(conn, message) end
case Mint.HTTP.stream(conn, message) do :unknown -> # ... {:ok, conn,
responses} -> # ... {:error, conn, reason, responses} -> # ... end
{:status, ref, 200} {:headers, ref, [...]} {:data, ref, "...chunk..."} {:done,
ref} {:error, ref, reason}
None
None
None
:inets.start() :ssl.start() :httpc.request( 'https://self-signed.badssl.com' ) #=> {:ok, {{'HTTP/1.1', 200, 'OK'}...}
:hackney.request( :get, "https://self-signed.badssl.com", _headers = [], _body = "", _opts
= [] ) #=> {:error, {:tls_alert, ...}}
:hackney.request( :get, "https://self-signed.badssl.com", _headers = [], _body = "", ssl_options:
[versions: [:"tlsv1.2"]] ) #=> {:ok, 200, ...}
Mint.HTTP.connect( :https, "https://self-signed.badssl.com", 443 ) #=> {:error, %Mint.TransportError{...}}
None
None
defp deps do [ # ..., {:mint, "~> 0.4"}, {:castore,
"~> 0.1"} ] end
None
None
proxy = { :http, "proxy.example.com", 80, _opts = [] }
Mint.HTTP.connect( :https, "httpbin.org", 443, proxy: proxy )
None
None
None
None
None
{ :push_promise, ref, promised_ref, promised_headers }
None
{:ok, conn, ref} = Mint.HTTP2.ping(conn) # ... response #=> {:pong,
^ref}
None
Mint.HTTP.connect(...) Mint.HTTP1.connect(...) Mint.HTTP2.connect(...)
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None