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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Andrea Leopardi
August 29, 2019
Programming
0
290
Mint - Disrupting HTTP clients
Andrea Leopardi
August 29, 2019
Tweet
Share
More Decks by Andrea Leopardi
See All by Andrea Leopardi
The Umbrella and the Range
whatyouhide
0
42
gen_statem - OTP's Unsung Hero
whatyouhide
2
310
The World is a Network (and We Are Just Nodes)
whatyouhide
1
250
BEAM: The Perfect Fit for Networks
whatyouhide
1
240
Update from the Elixir team - 2022
whatyouhide
0
450
Testing Asynchronous OTP
whatyouhide
1
560
Elixir Sightseeing Tour
whatyouhide
0
470
BEAM Architecture Handbook
whatyouhide
7
2.9k
The Evolution of a Language
whatyouhide
0
190
Other Decks in Programming
See All in Programming
ロボットのための工場に灯りは要らない
watany
11
3k
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
160
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
1.1k
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
240
OTP を自動で入力する裏技
megabitsenmzq
0
120
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
140
The free-lunch guide to idea circularity
hollycummins
0
290
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
190
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.4k
Fundamentals of Software Engineering In the Age of AI
therealdanvega
2
280
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
2
620
Java 21/25 Virtual Threads 소개
debop
0
150
Featured
See All Featured
Discover your Explorer Soul
emna__ayadi
2
1.1k
sira's awesome portfolio website redesign presentation
elsirapls
0
190
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Rails Girls Zürich Keynote
gr2m
96
14k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
First, design no harm
axbom
PRO
2
1.1k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
Context Engineering - Making Every Token Count
addyosmani
9
770
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
480
Designing Experiences People Love
moore
143
24k
How to Think Like a Performance Engineer
csswizardry
28
2.5k
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