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
Intro to Rest
Search
Matt Yoho
April 09, 2012
Programming
6
580
Intro to Rest
For Hungry Academy
Matt Yoho
April 09, 2012
Tweet
Share
More Decks by Matt Yoho
See All by Matt Yoho
Working with Git and GitHub
mattyoho
4
310
Qualitative Analysis of Algorithms
mattyoho
5
420
Metaprogramming Ruby
mattyoho
19
680
Exploiting The Resource Idiom
mattyoho
2
390
testing revisited - outside-in
mattyoho
1
120
shared_auth.pdf
mattyoho
0
2.3k
background job patterns
mattyoho
2
500
Request-Response cycle
mattyoho
5
180
Other Decks in Programming
See All in Programming
三者三様 宣言的UI
kkagurazaka
0
340
React Nativeならぬ"Vue Native"が実現するかも?_新世代マルチプラットフォーム開発フレームワークのLynxとLynxのVue.js対応を追ってみよう_Vue Lynx
yut0naga1_fa
2
2k
O Que É e Como Funciona o PHP-FPM?
marcelgsantos
0
250
Kotlinで実装するCPU/GPU 「協調的」パフォーマンス管理
matuyuhi
0
260
NIKKEI Tech Talk#38
cipepser
0
370
Module Proxyのマニアックな話 / Niche Topics in Module Proxy
kuro_kurorrr
0
1.3k
Go言語はstack overflowの夢を見るか?
logica0419
1
680
kiroとCodexで最高のSpec駆動開発を!!数時間で web3ネイティブなミニゲームを作ってみたよ!
mashharuki
0
1.1k
CSC509 Lecture 09
javiergs
PRO
0
280
Node-REDのノードの開発・活用事例とコミュニティとの関わり(Node-RED Con Nagoya 2025)
404background
0
110
SidekiqでAIに商品説明を生成させてみた
akinko_0915
0
110
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
520
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.7k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Why Our Code Smells
bkeepers
PRO
340
57k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Designing for humans not robots
tammielis
254
26k
Become a Pro
speakerdeck
PRO
29
5.6k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Facilitating Awesome Meetings
lara
57
6.6k
The Pragmatic Product Professional
lauravandoore
36
7k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
2
270
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Transcript
REST Monday, April 9, 12
Define APIs Monday, April 9, 12
Resources Monday, April 9, 12
Identified by URIs Monday, April 9, 12
http://store-engine.com/products/123 Monday, April 9, 12
Product id = 123 ... http://store-engine.com/products/123 Monday, April 9, 12
May be nested Monday, April 9, 12
http://store-engine.com/products/ 123/reviews/4 Monday, April 9, 12
Product id = 123 Review id = 4 http://store-engine.com/products/ 123/reviews/4
Monday, April 9, 12
May have multiple representations Monday, April 9, 12
http://store-engine.com/products/ 123.json Monday, April 9, 12
http://store-engine.com/products/ 123.json {"created_at":"2012-04-09T03:14:02Z","des cription":"Jog and listen to tunes.", "id": 123,"price":"79.0","title":"Walkman","upd
ated_at":"2012-04-09T03:14:42Z" {JSON} Monday, April 9, 12
http://store-engine.com/products/ 123.xml Monday, April 9, 12
<?xml version=\"1.0\" encoding=\"UTF-8\"?> <product> <created-at type="datetime">2012-04-09T03:14:02Z</created-at> <description>Jog and listen to
tunes.</description> <id type="integer">123</id> <price type="decimal">79.0</price> <title>Walkman</title> <updated-at type="datetime">2012-04-09T03:14:42Z</updated-at> </product> <xml> http://store-engine.com/products/ 123.xml Monday, April 9, 12
Rely on HTTP content type negotiation Monday, April 9, 12
HTTP headers Monday, April 9, 12
HTTP headers http://store-engine.com/products/ 123.json Monday, April 9, 12
Accept: application/json, text/ javascript, */*; Request header Monday, April 9,
12
Content-Type: application/json; Response header Monday, April 9, 12
CRUD via HTTP VERBS Monday, April 9, 12
GET POST PUT DELETE HTTP verbs Monday, April 9, 12
READ CREATE UPDATE DELETE Database CRUD operations Monday, April 9,
12
SHOW CREATE UPDATE DESTROY Rails controller actions Monday, April 9,
12
SHOW CREATE UPDATE DESTROY NEW EDIT INDEX Monday, April 9,
12
GET /products/123 HTTP/1.1 Accept:text/html Monday, April 9, 12
CRUD op GET /products/123 HTTP/1.1 Accept:text/html Monday, April 9, 12
Resource GET /products/123 HTTP/1.1 Accept:text/html Monday, April 9, 12
Representation GET /products/123 HTTP/1.1 Accept:text/html Monday, April 9, 12
GET /products/123 HTTP/1.1 Accept:text/html ProductsController#show Monday, April 9, 12