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
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
510
BEAM Architecture Handbook
whatyouhide
7
3.1k
Other Decks in Programming
See All in Programming
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
190
最近”作らせてる” ローカルAIアプリの話
akit37
0
500
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
150
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
170
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
1k
Domain-Driven Transformation
hschwentner
2
2.3k
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.8k
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
3
550
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
310
Groovy as a human and AI friendly programming language
paulk
0
120
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
130
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
0
150
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
41k
How to make the Groovebox
asonas
2
2.5k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
Optimising Largest Contentful Paint
csswizardry
37
4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
The browser strikes back
jonoalderson
0
1.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Accessibility Awareness
sabderemane
1
260
Speed Design
sergeychernyshev
33
2.2k
Designing for Timeless Needs
cassininazir
1
530
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
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