Professional Documents
Culture Documents
HTTPBasics PDF
HTTPBasics PDF
HTTP Basics
What is HTTP?
example:
“HTML/CSS/Javascript/Web Developers/Yaakov/Chaikin”
Identifying Resources on the Web
example:
/official_web_site/index.html
Identifying Resources on the Web
example:
http://www.mysite.com/official_web_site/index.html
HTTP Request Structure (GET)
² GET
• Retrieves the resource
• Data is passed to server as part of the URI
§ I.e., query string
² POST
• Sends data to server in order to be processed
• Data is sent in the message body
² More methods not covered here
HTTP Request Structure (POST)
firstName=Yaakov…
…
… message
body
HTTP Response Structure
Separated
by
a
single
space
HTTP/1.1 200 OK
² 200 OK
• Ok, here is the content you requested
² 404 Not Found
• Server can’t find the resource requested
² 403 Forbidden
• Unauthenticated client tried to access a secure resource
² 500 Internal Server Error
• Some unhandled error was raised on the server
Summary