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
Semantic Kernelのネイティブプラグインで知識拡張をしてみる
tomokusaba
0
180
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
730
Recoilを剥がしている話
kirik
5
6.6k
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
42 best practices for Symfony, a decade later
tucksaun
1
180
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
130
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
あれやってみてー駆動から成長を加速させる / areyattemite-driven
nashiusagi
1
200
Refactor your code - refactor yourself
xosofox
1
260
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
1
370
fs2-io を試してたらバグを見つけて直した話
chencmd
0
230
Go の GC の不得意な部分を克服したい
taiyow
2
770
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
A better future with KSS
kneath
238
17k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Docker and Python
trallard
42
3.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
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