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
300
0
Share
Mint - Disrupting HTTP clients
Andrea Leopardi
August 29, 2019
More Decks by Andrea Leopardi
See All by Andrea Leopardi
Agentic Elixir
whatyouhide
0
430
The Umbrella and the Range
whatyouhide
0
56
gen_statem - OTP's Unsung Hero
whatyouhide
2
330
The World is a Network (and We Are Just Nodes)
whatyouhide
1
250
BEAM: The Perfect Fit for Networks
whatyouhide
1
260
Update from the Elixir team - 2022
whatyouhide
0
460
Testing Asynchronous OTP
whatyouhide
1
570
Elixir Sightseeing Tour
whatyouhide
0
480
BEAM Architecture Handbook
whatyouhide
7
3k
Other Decks in Programming
See All in Programming
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
510
CDK Deployのための ”反響定位”
watany
5
910
実践CRDT
tamadeveloper
0
610
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
2.3k
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
280
GitHubCopilotCLIをはじめよう.pdf
htkym
0
300
Structured Concurrency, Scoped Values and Joiners in the JDK 25 26 27
josepaumard
1
120
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
250
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
180
Liberating Ruby's Parser from Lexer Hacks
ydah
2
2.4k
GoogleCloudとterraform完全に理解した
terisuke
1
170
The Less-Told Story of Socket Timeouts
coe401_
3
860
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
820
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
820
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
140
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
180
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
760
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
290
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
380
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.6k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
270
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.2k
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