SlideShare una empresa de Scribd logo
1 de 22
ReST-ful .NET Data Services Presented By: Joe Davis http://stygma.com Twitter: @stygz Facebook: http://www.facebook.com/joe.davis
HTTP Request Structure ,[object Object],[object Object],[object Object],[object Object],[object Object]
HTTP  GET  Request ,[object Object],[object Object],[object Object]
HTTP  POST  Request ,[object Object],[object Object],[object Object],[object Object]
HTTP Response ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Quick Web Proxy Demo ,[object Object]
Semantics Structure (HTML) Presentation (Style) Behavior (Script) Perform Action Supply Context Specify Resource
The Web IS ReST ,[object Object],[object Object],[object Object]
Identify the Resource ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
HTTP Methods Deletes resource DELETE Create or Update resource (returns current state after update) PUT Create resource (returns current state after creation—handy if server-generated resource ID is required) POST Retrieve resource HEADERS ONLY  HEAD Retrieve resource headers and body GET
ReST  GET  Request/Response ,[object Object],[object Object],HTTP/1.1 200 OK Content-Type: application/json Content-Length: 53 {“ProductID”:123,”Name”:”Super Widget”,”Price”:49.99}
ReST  POST  Request/Response ,[object Object],[object Object],[object Object],[object Object],[object Object],HTTP/1.1 201 CREATED Content-Type: application/json Content-Length: 53 {“ProductID”:456,”Name”:”Ultra Wigdet”,”Price”:59.99}
ReST  PUT  Request/Response ,[object Object],[object Object],[object Object],[object Object],[object Object],HTTP/1.1 202 ACCEPTED Content-Type: application/json Content-Length: 53 {“ProductID”:456,”Name”:”Ultra Widget”,”Price”:59.99}
HTTP Success Status Codes Partial Content 206 No Content 204 Accepted 202 Created  201 OK 200
HTTP Redirection Status Codes Found (Temporary Redirection) 302 Moved Permanently  301 Multiple Choices 300
HTTP Error Status Codes Request entity too large 413 Conflict 409 Request timeout 408 Method not allowed 405 Resource not found 404 Forbidden 403 Unsupported media type 415 Unauthorized  401 Bad Request 400
HTTP Server Error Status Codes HTTP version not supported 505 Service Unavailable 503 Not Implemented  501 Internal Server Error 500
Isn’t this SOAP? ,[object Object]
SOAP vs. ReST ,[object Object],[object Object],POST http://my.sample.com/stock HTTP/1.1 HOST: my.sample.com Content-Type: application/soap+xml Content-Length: 308 <?xml version=&quot;1.0&quot;?> <soap:Envelope xmlns:soap=“http://www.w3.org/2001/12/soap-envelope” soap:encodingStyle=&quot;http://www.w3.org/2001/12/soap-encoding&quot;> <soap:Body xmlns:m=&quot;http://my.sample.com/stock&quot;>   <m:GetStock>     <m:StockName>MSFT</m:StockName>   </m:GetStock> </soap:Body> </soap:Envelope>
So what’s RDF? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sample RDF Request/Response ,[object Object],[object Object],HTTP/1.1 200 OK Content-Type: text/rdf Content-Length: 389 <?xml version=&quot;1.0&quot;?>  <rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns:product=&quot;http://my.sample.com/product#&quot;>  <product:Widget rdf:about=&quot;http://my.sample.com/product#Super-Widget&quot;>  <product:ProductID>123</product:ProductID>  <product:Name>Super Widget</product:Name>  <product:Price>49.99</product:Price>  </product:Widget >  </rdf:RDF>
More Info…. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Más contenido relacionado

La actualidad más candente

Frontend Performance - Web Entwickler Forum
Frontend Performance - Web Entwickler ForumFrontend Performance - Web Entwickler Forum
Frontend Performance - Web Entwickler Forum
Pierre Spring
 

La actualidad más candente (20)

An introduction to HTTP/2 for SEOs
An introduction to HTTP/2 for SEOsAn introduction to HTTP/2 for SEOs
An introduction to HTTP/2 for SEOs
 
Writing automation tests with python selenium behave pageobjects
Writing automation tests with python selenium behave pageobjectsWriting automation tests with python selenium behave pageobjects
Writing automation tests with python selenium behave pageobjects
 
Web I - 05 - HTTP Protocol
Web I - 05 - HTTP ProtocolWeb I - 05 - HTTP Protocol
Web I - 05 - HTTP Protocol
 
HTTP/2 BrightonSEO 2018
HTTP/2 BrightonSEO 2018HTTP/2 BrightonSEO 2018
HTTP/2 BrightonSEO 2018
 
一次Http请求过程分析
一次Http请求过程分析一次Http请求过程分析
一次Http请求过程分析
 
Frontend Performance - Web Entwickler Forum
Frontend Performance - Web Entwickler ForumFrontend Performance - Web Entwickler Forum
Frontend Performance - Web Entwickler Forum
 
I got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't oneI got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't one
 
How to optimise TTFB - BrightonSEO 2020
How to optimise TTFB - BrightonSEO 2020How to optimise TTFB - BrightonSEO 2020
How to optimise TTFB - BrightonSEO 2020
 
Command Line Hacks For SEO - Brighton April 2018 - Tom Pool
Command Line Hacks For SEO - Brighton April 2018 - Tom PoolCommand Line Hacks For SEO - Brighton April 2018 - Tom Pool
Command Line Hacks For SEO - Brighton April 2018 - Tom Pool
 
The Case for HTTP/2
The Case for HTTP/2The Case for HTTP/2
The Case for HTTP/2
 
Introduction to python scrapping
Introduction to python scrappingIntroduction to python scrapping
Introduction to python scrapping
 
Efficient HTTP Apis
Efficient HTTP ApisEfficient HTTP Apis
Efficient HTTP Apis
 
Web Browsers And Other Mistakes
Web Browsers And Other MistakesWeb Browsers And Other Mistakes
Web Browsers And Other Mistakes
 
[OpenTRS-001] ooops
[OpenTRS-001] ooops[OpenTRS-001] ooops
[OpenTRS-001] ooops
 
PHP
PHPPHP
PHP
 
Hacking Web Performance 2019
Hacking Web Performance 2019Hacking Web Performance 2019
Hacking Web Performance 2019
 
20190516 web security-basic
20190516 web security-basic20190516 web security-basic
20190516 web security-basic
 
Browser extension
Browser extensionBrowser extension
Browser extension
 
5 steps to faster web sites & HTML5 games - updated for DDDscot
5 steps to faster web sites & HTML5 games - updated for DDDscot5 steps to faster web sites & HTML5 games - updated for DDDscot
5 steps to faster web sites & HTML5 games - updated for DDDscot
 
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP MeetupWeb Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
 

Similar a ReST-ful Resource Management

RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座
Li Yi
 
GTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementationGTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementation
David Calavera
 

Similar a ReST-ful Resource Management (20)

RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座
 
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google InfrastructureLiving in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
 
01. http basics v27
01. http basics v2701. http basics v27
01. http basics v27
 
Resource-Oriented Web Services
Resource-Oriented Web ServicesResource-Oriented Web Services
Resource-Oriented Web Services
 
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google InfrastructureLiving in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
 
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google InfrastructureLiving in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
 
Web Scraping with PHP
Web Scraping with PHPWeb Scraping with PHP
Web Scraping with PHP
 
HTTP fundamentals for developers
HTTP fundamentals for developersHTTP fundamentals for developers
HTTP fundamentals for developers
 
Pragmatic REST aka praxisnahes Schnittstellendesign
Pragmatic REST aka praxisnahes SchnittstellendesignPragmatic REST aka praxisnahes Schnittstellendesign
Pragmatic REST aka praxisnahes Schnittstellendesign
 
RESTful design
RESTful designRESTful design
RESTful design
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
 
Making the Most of HTTP In Your Apps
Making the Most of HTTP In Your AppsMaking the Most of HTTP In Your Apps
Making the Most of HTTP In Your Apps
 
Spring MVC 3 Restful
Spring MVC 3 RestfulSpring MVC 3 Restful
Spring MVC 3 Restful
 
HTTP Basics Demo
HTTP Basics DemoHTTP Basics Demo
HTTP Basics Demo
 
Internet Explorer 8 for Developers by Christian Thilmany
Internet Explorer 8 for Developers by Christian ThilmanyInternet Explorer 8 for Developers by Christian Thilmany
Internet Explorer 8 for Developers by Christian Thilmany
 
High Performance Websites
High Performance WebsitesHigh Performance Websites
High Performance Websites
 
RESTful Web Services with JAX-RS
RESTful Web Services with JAX-RSRESTful Web Services with JAX-RS
RESTful Web Services with JAX-RS
 
Front End Website Optimization
Front End Website OptimizationFront End Website Optimization
Front End Website Optimization
 
GTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementationGTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementation
 
HTTP Basic - PHP
HTTP Basic - PHPHTTP Basic - PHP
HTTP Basic - PHP
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 

ReST-ful Resource Management

  • 1. ReST-ful .NET Data Services Presented By: Joe Davis http://stygma.com Twitter: @stygz Facebook: http://www.facebook.com/joe.davis
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. Semantics Structure (HTML) Presentation (Style) Behavior (Script) Perform Action Supply Context Specify Resource
  • 8.
  • 9.
  • 10. HTTP Methods Deletes resource DELETE Create or Update resource (returns current state after update) PUT Create resource (returns current state after creation—handy if server-generated resource ID is required) POST Retrieve resource HEADERS ONLY HEAD Retrieve resource headers and body GET
  • 11.
  • 12.
  • 13.
  • 14. HTTP Success Status Codes Partial Content 206 No Content 204 Accepted 202 Created 201 OK 200
  • 15. HTTP Redirection Status Codes Found (Temporary Redirection) 302 Moved Permanently 301 Multiple Choices 300
  • 16. HTTP Error Status Codes Request entity too large 413 Conflict 409 Request timeout 408 Method not allowed 405 Resource not found 404 Forbidden 403 Unsupported media type 415 Unauthorized 401 Bad Request 400
  • 17. HTTP Server Error Status Codes HTTP version not supported 505 Service Unavailable 503 Not Implemented 501 Internal Server Error 500
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.