First

Protocolul HTTP

ROSEdu WebDev

Plan

Istorie - origini

De unde a plecat totul

Istorie - current

Și încotro a mers

Protocol - schemă

Schema protocolului

Protocol - URL

URL (adrese)

scheme://domain:port/path?query#fragment

Protocol - Request

Request

Protocol - Request - exemple

Request - exemple

    GET /story.html
    Connection: keep-alive

    POST /buy_ticket

    culoare=verde&parte=dreapta&etaj=2

Protocol - Response

Response

Protocol - Response - exemplu

Response - exemplu

    HTTP/1.1 404 Not Found
    Server: nginx/0.7.67
    Date: Fri, 24 Feb 2012 23:52:26 GMT
    Content-Type: text/html
    Content-Length: 169
    Connection: keep-alive

    <html>
    <head><title>404 Not Found</title></head>
    <body bgcolor="white">
    <center><h1>404 Not Found</h1></center>
    <hr><center>nginx/0.7.67</center>
    </body>
    </html>
    

Conținut tipic

Conținut tipic

  • Documente HTML
  • Styling CSS
  • Interacțiune JavaScript
  • Imagini, media
  • Linkuri între resurse

Conținut tipic - linkuri, formulare

Linkuri, formulare

  • <a href="http://www.rosedu.org">ROSEdu</a>
  • <img src="thumbs-up.png">
  • <link rel="stylesheet" href="style.css">
  • <link href="news.atom" rel="alternate" title="News feed" type="application/atom+xml">
  • <script src="modernizr.js"></script>
  • <form method="post" action="register_me">
      <!-- fields -->
    </form>
  • <input name="first_name" required>