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
HTTP API Design for iOS Applications
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Patrick Van Stee
August 16, 2013
Programming
700
11
Share
HTTP API Design for iOS Applications
Patrick Van Stee
August 16, 2013
More Decks by Patrick Van Stee
See All by Patrick Van Stee
Raft: Consensus for Rubyists
vanstee
141
7.4k
Elixir and Ecto
vanstee
5
990
Bootstrap
vanstee
8
830
Consensus: An Introduction to Raft
vanstee
21
3.1k
Convergent Replicated Data Types
vanstee
4
860
Pour Over Brewing Method
vanstee
1
400
Celluloid & DCell
vanstee
4
600
Map Reduce & Ruby
vanstee
10
890
Other Decks in Programming
See All in Programming
My daily life on Ruby
a_matsuda
3
380
書き換えて学ぶTemporal #fukts
pirosikick
2
370
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
510
Agentic Elixir
whatyouhide
0
450
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
1.9k
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
1.8k
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
3.1k
JCON - Create Agentic AI Apps, The Easy Way!
kdubois
1
110
SkillsをS3 Filesに置く時のあれこれ
watany
3
1.6k
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.7k
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
460
20260514_its_the_context_window_stupid.pdf
heita
0
990
Featured
See All Featured
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
360
How STYLIGHT went responsive
nonsquared
100
6.1k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
340
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
180
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
200
Into the Great Unknown - MozCon
thekraken
41
2.5k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
460
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
280
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
Navigating Team Friction
lara
192
16k
Transcript
HTTP API Design for iOS Applications
@vanstee Big Nerd Ranch
• Modeling Resources • Tools: Server and Client • Real
world problems • Future
Modeling Resources
The key abstraction of information in REST is a resource.
re·source /ˈrēˌsôrs/ A resource is a conceptual mapping to a
set of entities, not the entity that corresponds to the mapping at any particular point in time.
Resources are not just database records
Resources are the nouns. HTTP methods are the verbs. URIs
are the identifiers. Media types are the representations.
But what about transactions? searches? complex actions?
Don’t do this: POST /accounts/1/transfer/500.00/to/2 Try this instead: POST /transactions
{ “from”: 1, “to”: 2, “amount”: 500.00 }
Tools
Server-side • Rails • Active Model Serializers • Custom Responders
• rack-test and json_spec
Client-side • AFNetworking • RestKit (if you really need it)
• VCRURLConnection and mitmproxy
Real World Problems
Versioning Don’t do this: POST /v1/users/1 Try this instead: POST
/users/1 Accept: application/json; version=1.0
Authentication • OAuth2 with API routes for token generation •
NSURLConnection supports cookies • Basic Authentication over HTTPS*
Caching • NSURLCache has support for Cache-Control and ETags •
AFNetworking supports this by default • Rails gives you these for free
Smarter Requests • Side loading associated resources • HTTP Pipelining
for GET, HEAD, PUT, and DELETE requests • HTTP compression
Future
HTTP 2.0 • Based on SPDY • Multiplexing • Server
Push • Better compression
JSON API • Standard hypermedia type • Always namespaced •
Always returns collections for easy parsing • Support for batch operations
JSON Patch • Standard hypermedia type for updating records •
Easily handle associations • Send minimal amount of information
Thanks blog.steveklabnik.com designinghypermediaapis.com afnetworking.com jsonapi.org