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
JAWS Days 2025のインフラ
komakichi
1
330
Domain-Driven Design (Tutorial)
hschwentner
13
22k
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
270
Rails 1.0 のコードで学ぶ find_by* と method_missing の仕組み / Learn how find_by_* and method_missing work in Rails 1.0 code
maimux2x
1
260
新宿駅構内を三人称視点で探索してみる
satoshi7190
2
120
もう僕は OpenAPI を書きたくない
sgash708
6
1.9k
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
1.1k
読まないコードリーディング術
hisaju
0
120
Jakarta EE meets AI
ivargrimstad
0
650
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
1
650
TCAを用いたAmebaのリアーキテクチャ
dazy
0
220
バッチを作らなきゃとなったときに考えること
irof
2
550
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
580
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
Adopting Sorbet at Scale
ufuk
75
9.2k
Building Your Own Lightsaber
phodgson
104
6.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Visualization
eitanlees
146
15k
Being A Developer After 40
akosma
89
590k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
440
Speed Design
sergeychernyshev
28
820
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
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