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
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
Let's Write a Train Tracking Algorithm
twocentstudios
0
220
Conquering Massive Traffic Spikes in Ruby Applications with Pitchfork
riseshia
0
140
高度なUI/UXこそHotwireで作ろう Kaigi on Rails 2025
naofumi
4
3.2k
Playwrightはどのようにクロスブラウザをサポートしているのか
yotahada3
7
2.2k
実践AIチャットボットUI実装入門
syumai
7
2.4k
階層構造を表現するデータ構造とリファクタリング 〜1年で10倍成長したプロダクトの変化と課題〜
yuhisatoxxx
3
880
私はどうやって技術力を上げたのか
yusukebe
43
17k
NetworkXとGNNで学ぶグラフデータ分析入門〜複雑な関係性を解き明かすPythonの力〜
mhrtech
3
970
dynamic!
moro
9
5.9k
止められない医療アプリ、そっと Swift 6 へ
medley
1
110
株式会社 Sun terras カンパニーデック
sunterras
0
200
Reduxモダナイズ 〜コードのモダン化を通して、将来のライブラリ移行に備える〜
pvcresin
2
670
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.5k
Balancing Empowerment & Direction
lara
4
670
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
A Tale of Four Properties
chriscoyier
160
23k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
A better future with KSS
kneath
239
17k
Optimizing for Happiness
mojombo
379
70k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.7k
Building Adaptive Systems
keathley
43
2.8k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
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