SlideShare ist ein Scribd-Unternehmen logo
1 von 13
HTTP, REST  and the PATCH verb (accompanied by kittens) Thomas Parslow @almostobsolete http://almostobsolete.net
Web services ,[object Object],[object Object],[object Object],[object Object],[object Object]
HTTP is awesome! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REST ,[object Object],[object Object],[object Object],[object Object],[object Object]
Current main HTTP verbs GET PUT DELETE POST Show! Replace! Destroy! Do stuff!
Why REST? Trendy buzzword Discoverable, self describing APIs Less special cases and one offs More maintanable Less code!
Real world example:  Telephone conference control Conference Caller Get conference details ( GET ) Lock/Unlock Record On/ Record Off End conference Add caller (dialout) Get List Of Callers Evict caller Mute Caller Unmute caller
Conference {    "type": "conference",    "href": "http://example.com/conferences/1",    "head": {      "allow": [ "GET", "DELETE", "PUT", "PATCH" ],      "created_at": "2011-10-21T10:56:54Z",       "related": {        "callers": {"href": "http://example.com/conferences/1/callers"}    },    "body": {      "recording": false,      "locked": false    } } Caller List {    "type": "caller-list",    "href": "http://example.com/api/v1/conferences/1/callers",    "head": {      "allow": ["GET", "POST"]    },    "body": [      {"href": "http://example.com/conferences/1/callers/1"}    ] } Caller {    "type": "caller",    "href": "http://example.com/conferences/1/callers/1",    "head": {      "allow": [ "GET", "DELETE", "PUT", "PATCH" ]    },    "body": {      "phone_number": "07951261227",      "name": "Tom",      "type": "chair",      "muted": false    } } Real world example:  Telephone conference control Conference Caller
Real world example:  Telephone conference control Conference Caller Get conference details ( GET ) Lock/Unlock ( PUT ) Record On/ Record Off ( PUT ) End conference ( DELETE ) Get caller details ( GET ) Evict caller ( DELETE ) Mute Caller ( PUT ) Unmute caller ( PUT ) Caller List Get list of callers ( GET ) Add caller (dialout) ( POST )
Partial updates ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The PATCH Verb ,[object Object],[object Object],[object Object],[object Object],[object Object]
JSONPatch    ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Thanks for listening! Questions? @almostobsolete

Weitere ähnliche Inhalte

Ähnlich wie REST, HTTP, and the PATCH verb (with kittens)

Ähnlich wie REST, HTTP, and the PATCH verb (with kittens) (20)

XML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEARXML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEAR
 
Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP
 
Php 3 1
Php 3 1Php 3 1
Php 3 1
 
Putting SOAP to REST
Putting SOAP to RESTPutting SOAP to REST
Putting SOAP to REST
 
Real-time Ruby for the Real-time Web
Real-time Ruby for the Real-time WebReal-time Ruby for the Real-time Web
Real-time Ruby for the Real-time Web
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
Php performance
Php performancePhp performance
Php performance
 
Forum Presentation
Forum PresentationForum Presentation
Forum Presentation
 
Ruby off Rails---rack, sinatra and sequel
Ruby off Rails---rack, sinatra and sequelRuby off Rails---rack, sinatra and sequel
Ruby off Rails---rack, sinatra and sequel
 
An Introduction to Solr
An Introduction to SolrAn Introduction to Solr
An Introduction to Solr
 
Control Structures In Php 2
Control Structures In Php 2Control Structures In Php 2
Control Structures In Php 2
 
John Rowley Notes
John Rowley NotesJohn Rowley Notes
John Rowley Notes
 
Jsonsaga
JsonsagaJsonsaga
Jsonsaga
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
We9 Struts 2.0
We9 Struts 2.0We9 Struts 2.0
We9 Struts 2.0
 
Lect_html1
Lect_html1Lect_html1
Lect_html1
 
Douglas Crockford Presentation Jsonsaga
Douglas Crockford Presentation JsonsagaDouglas Crockford Presentation Jsonsaga
Douglas Crockford Presentation Jsonsaga
 
The JSON Saga
The JSON SagaThe JSON Saga
The JSON Saga
 
Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)
 
Php Training
Php TrainingPhp Training
Php Training
 

Kürzlich hochgeladen

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 

Kürzlich hochgeladen (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 

REST, HTTP, and the PATCH verb (with kittens)

  • 1. HTTP, REST  and the PATCH verb (accompanied by kittens) Thomas Parslow @almostobsolete http://almostobsolete.net
  • 2.
  • 3.
  • 4.
  • 5. Current main HTTP verbs GET PUT DELETE POST Show! Replace! Destroy! Do stuff!
  • 6. Why REST? Trendy buzzword Discoverable, self describing APIs Less special cases and one offs More maintanable Less code!
  • 7. Real world example:  Telephone conference control Conference Caller Get conference details ( GET ) Lock/Unlock Record On/ Record Off End conference Add caller (dialout) Get List Of Callers Evict caller Mute Caller Unmute caller
  • 8. Conference {   "type": "conference",   "href": "http://example.com/conferences/1",   "head": {     "allow": [ "GET", "DELETE", "PUT", "PATCH" ],     "created_at": "2011-10-21T10:56:54Z",      "related": {       "callers": {"href": "http://example.com/conferences/1/callers"}   },   "body": {     "recording": false,     "locked": false   } } Caller List {   "type": "caller-list",   "href": "http://example.com/api/v1/conferences/1/callers",   "head": {     "allow": ["GET", "POST"]   },   "body": [     {"href": "http://example.com/conferences/1/callers/1"}   ] } Caller {   "type": "caller",   "href": "http://example.com/conferences/1/callers/1",   "head": {     "allow": [ "GET", "DELETE", "PUT", "PATCH" ]   },   "body": {     "phone_number": "07951261227",     "name": "Tom",     "type": "chair",     "muted": false   } } Real world example:  Telephone conference control Conference Caller
  • 9. Real world example:  Telephone conference control Conference Caller Get conference details ( GET ) Lock/Unlock ( PUT ) Record On/ Record Off ( PUT ) End conference ( DELETE ) Get caller details ( GET ) Evict caller ( DELETE ) Mute Caller ( PUT ) Unmute caller ( PUT ) Caller List Get list of callers ( GET ) Add caller (dialout) ( POST )
  • 10.
  • 11.
  • 12.
  • 13. Thanks for listening! Questions? @almostobsolete