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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
37
gen_statem - OTP's Unsung Hero
whatyouhide
2
310
The World is a Network (and We Are Just Nodes)
whatyouhide
1
240
BEAM: The Perfect Fit for Networks
whatyouhide
1
230
Update from the Elixir team - 2022
whatyouhide
0
450
Testing Asynchronous OTP
whatyouhide
1
560
Elixir Sightseeing Tour
whatyouhide
0
460
BEAM Architecture Handbook
whatyouhide
7
2.9k
The Evolution of a Language
whatyouhide
0
190
Other Decks in Programming
See All in Programming
CopilotKit + AG-UIを学ぶ
nearme_tech
PRO
1
120
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
1.3k
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
320
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
410
浮動小数の比較について
kishikawakatsumi
0
360
SourceGeneratorのマーカー属性問題について
htkym
0
110
CSC307 Lecture 10
javiergs
PRO
1
690
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
150
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
220
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
130
AI活用のコスパを最大化する方法
ochtum
0
120
要求定義・仕様記述・設計・検証の手引き - 理論から学ぶ明確で統一された成果物定義
orgachem
PRO
1
510
Featured
See All Featured
Being A Developer After 40
akosma
91
590k
Balancing Empowerment & Direction
lara
5
920
WENDY [Excerpt]
tessaabrams
9
36k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
140
Faster Mobile Websites
deanohume
310
31k
Deep Space Network (abreviated)
tonyrice
0
81
Designing Powerful Visuals for Engaging Learning
tmiket
0
250
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
130
Abbi's Birthday
coloredviolet
2
5k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
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