Your SlideShare is downloading. ×
0
RESTful APIs with Herman Radtke
RESTful APIs with Herman Radtke
RESTful APIs with Herman Radtke
RESTful APIs with Herman Radtke
RESTful APIs with Herman Radtke
RESTful APIs with Herman Radtke
RESTful APIs with Herman Radtke
RESTful APIs with Herman Radtke
RESTful APIs with Herman Radtke
RESTful APIs with Herman Radtke
RESTful APIs with Herman Radtke
RESTful APIs with Herman Radtke
RESTful APIs with Herman Radtke
RESTful APIs with Herman Radtke
RESTful APIs with Herman Radtke
RESTful APIs with Herman Radtke
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

RESTful APIs with Herman Radtke

148

Published on

We have probably all heard of REST. It is currently the popular way to create APIs for internal and/or external use. Virtually all RESTful API’s are built on top of HTTP. Thus, it is important to …

We have probably all heard of REST. It is currently the popular way to create APIs for internal and/or external use. Virtually all RESTful API’s are built on top of HTTP. Thus, it is important to understand how the different HTTP methods work. They are key to creating a solid RESTful API and offer so much more than simple CRUD. We will be taking a deep-dive into the HTTP methods and coming away with a solid understanding of how they function.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
148
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. HTTP MethodsHow They Relate to RESTful APIs
  • 2. About MeHerman J. Radtke IIIWeb Architect at HauteLook Design the RESTful APIWriting PHP for 9 yearsMaintain pecl/gearman and pecl/memcache
  • 3. PerspectiveHauteLooks API is for internal use Very few restrictions on design Example: NetflixMany companies have an external API Concerned with how the design affects other clients (ex: flash) Examples: Twilio, Jira, Facebook
  • 4. Why?REST is an architectural styleNot satisfied with the existing explanations
  • 5. GET vs POSTDo we actually know the differences?
  • 6. GET vs POSTI ask every interviewee this question.Common answers:GET does not send a body in the requestPOST can send more dataPOST is more secure
  • 7. IdempotenceIdempotence means no side-effects.This is the most important difference! GET is idempotent (safe) POST is not idempotent (unsafe)It allows the web to scale.
  • 8. Improper use of GET<a href=”/logout.php”>Logout</a>We just broke the internet Caching proxies Browser "accelerator" pluginsBetter to use a form with the POST methodOther example: Tracking Pixels
  • 9. POST vs PUTPOST is create and PUT is update, right?Not so simple Methods do not map to CRUD CRUD can map to the methodsKey difference? PUT is idempotent!
  • 10. Create Using POST
  • 11. Create Using PUT
  • 12. Update Using POST 1/2
  • 13. Update Using POST 2/2
  • 14. Update Using PUT
  • 15. Other HTTP MethodsPATCHDELETEHEADOPTIONS
  • 16. Additional ResourcesRFC 2616 Method Definitions - http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#rest on freenodeMy twitter - @hermanradtke

×