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

Introduction to HTTP 1.1

Introduction to HTTP 1.1

A brief introduction to HTTP for web and mobile developers.

Zaki Shaheen

April 07, 2015
Tweet

More Decks by Zaki Shaheen

Other Decks in Programming

Transcript

  1. “There is no sense in being precise if you do

    not know what you are talking about.”
 
 John von Neumann
  2. Prerequisites Understanding of computer networks Understanding of OSI and TCP/IP

    Model Understanding of network applications (client, server, connection, persistent/nonpersistent connection, etc.)
  3. What is HTTP? HTTP = HyperText Transfer Protocol Application-level protocol

    for distributed, collaborative hypermedia systems. Mother of All Demos (D. Englebart - 1968)
  4. Foundational technology of the WorldWideWeb. 
 Generic and stateless. 


    Can be used for almost any kind of information exchange in a distributed environment. 
 Focus on “negotiation” to transfer any kind of data.
  5. Brief History of HTTP v0.9 - 1991
 v1.0 - 1996

    (Tim Berners-Lee RFC1945)
 v1.1 - 1999 (The internet society - RFC2616)
 
 Other related things: URIs (RFC 5785)
  6. 2014 update to HTTP Message syntax and routing (RFC 7230)


    Semantics and content (RFC 7231)
 Conditional Requests (RFC 7232) Range Requests (RFC 7233)
 Caching (RFC 7234)
 Authentication (RFC 7235)
 Authentication Registration (RFC 7236) ...
  7. Header fields general-header request-header | response-header entity-header message body can

    be any content but must be specified what kind of content it is.
  8. GET and HEAD Normal GET
 Partial GET (Range headers) Conditional

    GET (If-Modified-Since)
 
 Head only returns the header, not the entity itself.
  9. POST The POST method is used to request that the

    origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line.
  10. PUT and DELETE Add or update. Client specifies the URI.

    
 If new Entity is created - respond with 201. 
 If existing entity is updated - respond with 200.
 
 
 Delete deletes the entity specified.
  11. 41 Status codes Informational: 100-101 Successful: 200 - 206 Redirection:

    300 - 307
 Client error: 400 - 417
 Server error: 500 - 505
  12. 100 - continue 101 - switching protocols 200 - OK

    201 - Created 202 - Accepted 203 - non-authoritative information 204 - no content
  13. 205 - reset content 206 - partial content …
 400

    - bad request 401 - unauthorized 403 - forbidden 404 - not found
  14. Resources Read the HTTP and related RFCs TutsPlus articles on

    HTTP
 Read The Innovators for a beautiful history of computing.