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
Go 1.6 and HTTP/2
Search
Nathan Youngman
February 22, 2016
Programming
160
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Go 1.6 and HTTP/2
It Just Works*
Nathan Youngman
February 22, 2016
More Decks by Nathan Youngman
See All by Nathan Youngman
The Healthy Programmer
nathany
2
120
Go and Node.js: a comparison
nathany
1
250
Diet Hacks
nathany
2
400
Upgrading Rails Redux
nathany
1
110
GopherCon recap
nathany
0
200
Go Functions
nathany
0
120
Go Arrays & Slices
nathany
0
180
Go Types
nathany
2
140
Go Packages
nathany
2
570
Other Decks in Programming
See All in Programming
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
240
Contextとはなにか
chiroruxx
1
390
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.8k
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
240
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
13
2.2k
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.7k
霧の中の代数的エフェクト
funnyycat
1
190
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
270
関数型プログラミングのメリットって何だろう?
wanko_it
0
130
自作OSでスライド発表する
uyuki234
1
3.6k
Agentic UI
manfredsteyer
PRO
0
220
act1-costs.pdf
sumedhbala
0
170
Featured
See All Featured
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
410
Git: the NoSQL Database
bkeepers
PRO
432
67k
Tell your own story through comics
letsgokoyo
1
980
The Curious Case for Waylosing
cassininazir
1
420
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
210
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
How to train your dragon (web standard)
notwaldorf
97
6.7k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
380
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
300
Transcript
Go 1.6 and HTTP/2 @nathany
It Just Works*
Server err := http.ListenAndServeTLS(":443", "cert.pem", "key.pem", nil)
Client response, err := http.Get("https:// http2.golang.org/reqinfo")
Issue #14391 • http.Client doesn't support http2 by default
Issue #14275 • net/http: Transport's automatic http2 too aggressive
golang.org/x/net/http2
Configure Transport transport := &http.Transport{} err := http2.ConfigureTransport(transport) if err
!= nil { log.Fatal(err) } client := &http.Client{Transport: transport} response, err := client.Get("https:// http2.golang.org/reqinfo")
Buford github.com/RobotsAndPencils/buford
Custom Cert func NewClient(cert tls.Certificate) (*http.Client, error) { config :=
&tls.Config{ Certificates: []tls.Certificate{cert}, } config.BuildNameToCertificate() transport := &http.Transport{TLSClientConfig: config} if err := http2.ConfigureTransport(transport); err != nil { return nil, err } return &http.Client{Transport: transport}, nil }