SlideShare a Scribd company logo
HTTP Methods
How They Relate to RESTful API's
About Me
Herman J. Radtke III

Web Architect at HauteLook
  Design the RESTful API

Writing PHP for 9 years

Maintain pecl/gearman and pecl/memcache
Perspective
HauteLook's API is for internal use
  Very few restrictions on design
  Example: Netflix

Many companies have an external API
  Concerned with how the design affects
  other clients (ex: flash)
  Examples: Twilio, Jira, Facebook
Why?
REST is an architectural style




Not satisfied with the existing explanations
GET vs POST




Do we actually know the differences?
GET vs POST
I ask every interviewee this question.

Common answers:
GET does not send a body in the request

POST can send more data

POST is more secure
Idempotence
Idempotence 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.
Improper use of GET
<a href=”/logout.php”>Logout</a>

We just broke the internet
  Caching proxies
  Browser "accelerator" plugins

Better to use a form with the POST method

Other example: Tracking Pixels
POST vs PUT
POST is create and PUT is update, right?

Not so simple
  Methods do not map to CRUD
  CRUD can map to the methods

Key difference?
  PUT is idempotent!
Create Using POST
Create Using PUT
Update Using POST 1/2
Update Using POST 2/2
Update Using PUT
Other HTTP Methods
PATCH

DELETE

HEAD

OPTIONS
Additional Resources
RFC 2616 Method Definitions - http://www.
w3.org/Protocols/rfc2616/rfc2616-sec9.html

#rest on freenode

My twitter - @hermanradtke

More Related Content

PDF
Groking HTTP Methods
PDF
RESTful API Design, Second Edition
PPT
Specs2 whirlwind tour at Scaladays 2014
PDF
Patterns for key-value stores
PPT
PHP Server side restful API - linkedin
PDF
Restful api design
PPTX
RESTful API Design Best Practices Using ASP.NET Web API
PPT
Programming coldfusion with APIs
Groking HTTP Methods
RESTful API Design, Second Edition
Specs2 whirlwind tour at Scaladays 2014
Patterns for key-value stores
PHP Server side restful API - linkedin
Restful api design
RESTful API Design Best Practices Using ASP.NET Web API
Programming coldfusion with APIs

Similar to RESTful APIs with Herman Radtke (20)

PPT
Build APIs With Kapow Mashup Server
PPTX
Governance enforcement with out of the box SharePoint
PPTX
Using rest to create responsive html 5 share point intranets
PPTX
Unerstanding and Using RESTful APIs
PDF
Rapid Web Development with Python for Absolute Beginners
PPTX
RESTful application with Drupal 8
PDF
A RESTful introduction
ODP
REST API Laravel
PPTX
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
PPT
What is the big deal about HTML5
PDF
HTTP Basics Demo
PDF
PPTX
What is Full Stack Python Development? A Beginner’s Guide
PPTX
CTE 323 - Lecture 1.pptx
PPTX
Software performance testing_overview
PPTX
Qualite 2
ODP
Designing Good API & Its Importance
PPTX
Flash SEO Secrets
DOCX
MAKHANLAL CHATURVEDI RASHTRIYA PATRAKARITA AVAM SANCHAR VISHWAVIDYALAYA
PPTX
Jim Hendler's Presentation at SSSW 2011
Build APIs With Kapow Mashup Server
Governance enforcement with out of the box SharePoint
Using rest to create responsive html 5 share point intranets
Unerstanding and Using RESTful APIs
Rapid Web Development with Python for Absolute Beginners
RESTful application with Drupal 8
A RESTful introduction
REST API Laravel
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
What is the big deal about HTML5
HTTP Basics Demo
What is Full Stack Python Development? A Beginner’s Guide
CTE 323 - Lecture 1.pptx
Software performance testing_overview
Qualite 2
Designing Good API & Its Importance
Flash SEO Secrets
MAKHANLAL CHATURVEDI RASHTRIYA PATRAKARITA AVAM SANCHAR VISHWAVIDYALAYA
Jim Hendler's Presentation at SSSW 2011
Ad

Recently uploaded (20)

PDF
Empathic Computing: Creating Shared Understanding
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Spectroscopy.pptx food analysis technology
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
cuic standard and advanced reporting.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
KodekX | Application Modernization Development
PDF
Unlocking AI with Model Context Protocol (MCP)
Empathic Computing: Creating Shared Understanding
Digital-Transformation-Roadmap-for-Companies.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Network Security Unit 5.pdf for BCA BBA.
Agricultural_Statistics_at_a_Glance_2022_0.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Spectroscopy.pptx food analysis technology
Reach Out and Touch Someone: Haptics and Empathic Computing
Building Integrated photovoltaic BIPV_UPV.pdf
Big Data Technologies - Introduction.pptx
Understanding_Digital_Forensics_Presentation.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
cuic standard and advanced reporting.pdf
MYSQL Presentation for SQL database connectivity
Per capita expenditure prediction using model stacking based on satellite ima...
KodekX | Application Modernization Development
Unlocking AI with Model Context Protocol (MCP)
Ad

RESTful APIs with Herman Radtke