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
300
Qualitative Analysis of Algorithms
mattyoho
5
410
Metaprogramming Ruby
mattyoho
19
670
Exploiting The Resource Idiom
mattyoho
2
390
testing revisited - outside-in
mattyoho
1
110
shared_auth.pdf
mattyoho
0
2.3k
background job patterns
mattyoho
2
490
Request-Response cycle
mattyoho
5
180
Other Decks in Programming
See All in Programming
Dev ContainersとGitHub Codespacesの素敵な関係
ymd65536
1
140
C++でシェーダを書く
fadis
6
4.1k
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
1.8k
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
2
580
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
240
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
CSC509 Lecture 11
javiergs
PRO
0
180
Macとオーディオ再生 2024/11/02
yusukeito
0
360
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
[PyCon Korea 2024 Keynote] 커뮤니티와 파이썬, 그리고 우리
beomi
0
120
Featured
See All Featured
For a Future-Friendly Web
brad_frost
175
9.4k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Designing for humans not robots
tammielis
250
25k
Music & Morning Musume
bryan
46
6.2k
Embracing the Ebb and Flow
colly
84
4.5k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
How STYLIGHT went responsive
nonsquared
95
5.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Unsuck your backbone
ammeep
668
57k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
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