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
0
240
Mint - Disrupting HTTP clients
Andrea Leopardi
August 29, 2019
Tweet
Share
More Decks by Andrea Leopardi
See All by Andrea Leopardi
gen_statem - OTP's Unsung Hero
whatyouhide
1
170
The World is a Network (and We Are Just Nodes)
whatyouhide
1
200
BEAM: The Perfect Fit for Networks
whatyouhide
1
180
Update from the Elixir team - 2022
whatyouhide
0
390
Testing Asynchronous OTP
whatyouhide
1
510
Elixir Sightseeing Tour
whatyouhide
0
410
BEAM Architecture Handbook
whatyouhide
7
2.8k
The Evolution of a Language
whatyouhide
0
140
Elixir - functional, concurrent, distributed programming for the rest of us
whatyouhide
2
320
Other Decks in Programming
See All in Programming
AIコーディングワークフローの試行 〜AIエージェント×ワークフローでの自動化を目指して〜
rkaga
0
390
PHPer's Guide to Daemon Crafting Taming and Summoning
uzulla
2
1.1k
本当だってば!俺もTRICK 2022に入賞してたんだってば!
jinroq
0
270
Day0 初心者向けワークショップ実践!ソフトウェアテストの第一歩
satohiroyuki
0
490
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
500
アプリを起動せずにアプリを開発して品質と生産性を上げる
ishkawa
0
2k
リアルタイムレイトレーシング + ニューラルレンダリング簡単紹介 / Real-Time Ray Tracing & Neural Rendering: A Quick Introduction (2025)
shocker_0x15
1
240
Devinのメモリ活用の学びを自社サービスにどう組み込むか?
itarutomy
0
1.8k
custom_lintで始めるチームルール管理
akaboshinit
0
170
Go1.24で testing.B.Loopが爆誕
kuro_kurorrr
0
170
DataStoreをテストする
mkeeda
0
210
パスキーのすべて / 20250324 iddance Lesson.5
kuralab
0
140
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Testing 201, or: Great Expectations
jmmastey
42
7.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
480
Building Applications with DynamoDB
mza
94
6.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.6k
Facilitating Awesome Meetings
lara
53
6.3k
A better future with KSS
kneath
238
17k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
17
1.1k
The Pragmatic Product Professional
lauravandoore
33
6.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Statistics for Hackers
jakevdp
798
220k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
46
2.4k
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