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
Building well-defined APIs part 1: Proper HTTP
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Nikica Jokić
December 23, 2014
Technology
0
91
Building well-defined APIs part 1: Proper HTTP
Short intro to Ruby port of Webmachine.
Nikica Jokić
December 23, 2014
Tweet
Share
More Decks by Nikica Jokić
See All by Nikica Jokić
Aggregating data accountably and consistently
neektza
0
56
Other Decks in Technology
See All in Technology
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
72k
Evolution of Claude Code & How to use features
oikon48
0
170
ビズリーチにおける検索・推薦の取り組み / DEIM2026
visional_engineering_and_design
1
100
Agentic Codingの実践とチームで導入するための工夫
lycorptech_jp
PRO
0
400
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
44k
プロジェクトマネジメントをチームに宿す -ゼロからはじめるチームプロジェクトマネジメントは活動1年未満のチームの教科書です- / 20260304 Shigeki Morizane
shift_evolve
PRO
1
110
Eight Engineering Unit 紹介資料
sansan33
PRO
1
6.9k
Kiro のクレジットを使い切る!
otanikohei2023
0
110
男(監査)はつらいよ - Policy as CodeからAIエージェントへ
ken5scal
5
730
クラウド時代における一時権限取得
krrrr38
1
160
ヘルシーSRE
tk3fftk
2
240
大規模サービスにおける レガシーコードからReactへの移行
magicpod
1
130
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Color Theory Basics | Prateek | Gurzu
gurzu
0
230
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
360
Visualization
eitanlees
150
17k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
240
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
370
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
210
YesSQL, Process and Tooling at Scale
rocio
174
15k
It's Worth the Effort
3n
188
29k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
200
Chasing Engaging Ingredients in Design
codingconduct
0
130
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
Transcript
Proper HTTP Building well-defined APIs, part 1: @neektza Nikica Jokić
HTTP is deceptively simple
• simple syntax, semantics up to you HTTP is deceptively
simple
• simple syntax, semantics up to you • easy to
build crappy, bad-behaving APIs HTTP is deceptively simple
• simple syntax, semantics up to you • easy to
build crappy, bad-behaving APIs • use error status codes HTTP is deceptively simple
• simple syntax, semantics up to you • easy to
build crappy, bad-behaving APIs • use error status codes • respect content-types (accept headers) HTTP is deceptively simple
• simple syntax, semantics up to you • easy to
build crappy, bad-behaving APIs • use error status codes • respect content-types (accept headers) • handle resource migration and locations HTTP is deceptively simple
A huge SVG! http://for-get.github.io/http-decision-diagram/httpdd.fsm.html
Webmachine (1/2)
• Not a framework - a toolkit Webmachine (1/2)
• Not a framework - a toolkit • Implements the
HTTP protocol as a state-machine Webmachine (1/2)
• Not a framework - a toolkit • Implements the
HTTP protocol as a state-machine Webmachine (1/2)
• Not a framework - a toolkit • Implements the
HTTP protocol as a state-machine Webmachine (1/2)
• Not a framework - a toolkit • Implements the
HTTP protocol as a state-machine • Several implementations: Webmachine (1/2)
• Not a framework - a toolkit • Implements the
HTTP protocol as a state-machine • Several implementations: • Webmachine (1st Erlang, then Ruby) Webmachine (1/2)
• Not a framework - a toolkit • Implements the
HTTP protocol as a state-machine • Several implementations: • Webmachine (1st Erlang, then Ruby) • Liberator (Clojure) Webmachine (1/2)
• Not a framework - a toolkit • Implements the
HTTP protocol as a state-machine • Several implementations: • Webmachine (1st Erlang, then Ruby) • Liberator (Clojure) • others? Webmachine (1/2)
A huge SVG! Again! http://for-get.github.io/http-decision-diagram/httpdd.fsm.html
Webmachine (2/2)
• Declarative Webmachine (2/2)
• Declarative Webmachine (2/2) get '/hello/:name' do "Hello #{params[:name]}!" end
• Declarative • Works by describing facts about the resource
Webmachine (2/2) get '/hello/:name' do "Hello #{params[:name]}!" end
• Declarative • Works by describing facts about the resource
Webmachine (2/2) get '/hello/:name' do "Hello #{params[:name]}!" end def resource_exists? resource end
• Declarative • Works by describing facts about the resource
Webmachine (2/2) get '/hello/:name' do "Hello #{params[:name]}!" end def resource_exists? resource end • known-method? / method-allowed ? • known-media-type? / media-type-available? • allowed? / authorised? • exists? / existed? • moved-temporarily? / moved-permanently?