Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RESTful Applications: Past, Present and Future

Ahmad Nassri
November 22, 2014

RESTful Applications: Past, Present and Future

My talk at Fullstack Toronto Conference - November 2014 #FSTOCO - http://fsto.co/speakers

Ahmad Nassri

November 22, 2014
Tweet

More Decks by Ahmad Nassri

Other Decks in Technology

Transcript

  1. GET /who HTTP/1.1 Host: www.ahmadnassri.com Accept: application/json HTTP/1.1 200 OK

    Date: Sat, 22 Nov 2014 15:15:00 GMT Content-Type: application/json { "name": "Ahmad Nassri", "website": "http://www.ahmadnassri.com/", "twitter": "http://twitter.com/ahmadnassri", "email": "[email protected]", "bio": "Technologist, Entrepreneur, Dog Lover", "work": { "company": " ", "title": "API Master" } } Mashape.com
  2. : Started as notes written by Tim Berners Lee. First

    standard HTTP/1.0 version (RFC 1945). HTTP/1.1 (RFC 2616) & REST presential tate ransfer by Roy Fielding Refactoring with HTTP/1.1 bis SPDY by Google IETF working group released draft of HTTP/2 RFC2616 is Dead! HTTP/2 Last Call!
  3. RFC7230 - HTTP/1.1: Message Syntax and Routing RFC7231 - HTTP/1.1:

    Semantics and Content RFC7232 - HTTP/1.1: Conditional Requests RFC7233 - HTTP/1.1: Range Requests RFC7234 - HTTP/1.1: Caching RFC7235 - HTTP/1.1: Authentication
  4. GET /player/1234567890 HTTP/1.1 { "@context": { "@vocab": "https://schema.org/", "image": {

    "@type": "@id" }, "friends": { "@type": "@id" } }, "@id": "https://api.example.com/player/1234567890", "playerId": "1234567890", "name": "Kevin Sookocheff", "alternateName": "soofaloofa", "image": "https://api.example.com/player/1234567890/avatar.png", "friends": "https://api.example.com/player/1234567890/friends" }
  5. GET /player/1234567890/friends HTTP/1.1 { "@context": [ "http://www.w3.org/ns/hydra/core", { "@vocab": "https://schema.org/",

    "image": { "@type": "@id" }, "friends": { "@type": "@id" } } ], "@id": "https://api.example.com/player/1234567890/friends", "operation": { "@type": "BefriendAction", "method": "POST", "expects": { "@id": "http://schema.org/Person", "supportedProperty": [ { "property": "name", "range": "Text" }, { "property": "alternateName", "range": "Text" }, { "property": "image", "range": "URL" } ] } }, "member": [ { "@id": "https://api.example.com/player/1895638109", "name": "Sheldon Dong", "alternateName": "sdong", "image": "https://api.example.com/player/1895638109/avatar.png", "friends": "https://api.example.com/player/1895638109/friends" }, { "@id": "https://api.example.com/player/8371023509", ... } ], "nextPage": "https://api.example.com/player/1234567890/friends?page=2" }
  6. # URL Versioning: GET /api/v2/foo HTTP/1.1 # Custom Header: GET

    /api/foo X-VERSION: 2 # Content Type GET: /api/foo Accept: application/vnd.github.v3.raw+json
  7. Stalk me on Twitter , Read more on my ,

    Follow my APIs on . @AhmadNassri Blog Mashape.com/AhmadNassri http://www.ahmadnassri.com http://www.mashape.com