Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Mint - Disrupting HTTP clients
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Andrea Leopardi
August 29, 2019
Programming
320
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Mint - Disrupting HTTP clients
Andrea Leopardi
August 29, 2019
More Decks by Andrea Leopardi
See All by Andrea Leopardi
Agentic Elixir
whatyouhide
0
620
The Umbrella and the Range
whatyouhide
0
75
gen_statem - OTP's Unsung Hero
whatyouhide
2
370
The World is a Network (and We Are Just Nodes)
whatyouhide
1
270
BEAM: The Perfect Fit for Networks
whatyouhide
1
280
Update from the Elixir team - 2022
whatyouhide
0
470
Testing Asynchronous OTP
whatyouhide
1
590
Elixir Sightseeing Tour
whatyouhide
0
500
BEAM Architecture Handbook
whatyouhide
7
3k
Other Decks in Programming
See All in Programming
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.5k
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
280
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
310
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
AmebaブログはKMPから卒業します
kmars0605
0
190
APNsからLive Activityを開始する話
yumnumm
0
170
golang-bob.pdf
iwatsukayura
0
130
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.4k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
A Soul's Torment
seathinner
8
3.8k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
520
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
640
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
450
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
The Cult of Friendly URLs
andyhume
79
7k
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