Documente Academic
Documente Profesional
Documente Cultură
Sunil Ramaswamy
PREVIEW
What is HTTP
Request/Response formats
Request/Response headers
HTTP methods
What is HTTPS
WHAT IS HTTP
Web browsers cache previously accessed web resources and reuse them
Client/Server signals the close of a TCP connection using the Connection header
field.
REQUEST FORMAT
RESPONSE FORMAT
HTTP METHODS
Method
Description
GET
Retrieve a resource
PUT
Store a resource
DELETE
Remove a resource
POST
Update a resource
HEAD
Category
100-199
Informational
200-299
Successful
300-399
Redirection
400-499
Client Error
500-599
Server Error
Reason
Description
200
OK
The status code everyone wants to see. A 200 code in the response means everything
worked!
301
Moved Permanently
The resource has moved to the URL specified in theLocation header and the client never
needs to check this URL again.
We saw an example of this earlier when we used Telnet and the server redirected us
from www.odetocode.com toodetocode.com to give search engines a canonical URL.
The resource has moved to the URL specified in theLocation header. In the future, the
client can still request the URL because it's a temporary move.
302
Moved Temporarily
304
Not Modified
This is the server telling the client that the resource hasn't changed since the last time the
client retrieved the resource, so it can just use a locally cached copy.
400
Bad Request
The server could not understand the request. The request probably used incorrect syntax.
403
Forbidden
404
Not Found
500
The server encountered an error in processing the request. Commonly happens because
of programming errors in a web application.
503
Service Unavailable
The server will currently not service the request. This status code can appear when a server
is throttling requests because it is under heavy load.
This type of response code is typically used after a POSToperation to move a client to a
resource it can retrieve with GET (the POST/Redirect/GET pattern we talked about earlier).
Description
Host
User-Agent
Accept-Language
Accept-Encoding
If-Modified-Since
Cookie
Referer
Authorization
Description
Cache Control
Content-Type
Content-Disposition
Content-Length
Size of content
Location
Redirection url
Set-Cookie
Writes a cookie
WWW-Authenticate
Content-Encoding
Compression format
WHAT IS HTTPS
HTTPS URLs begin with "https://" and use port 443 by default
HTTP is layered on top of the SSL/TLS protocol, thus securing the complete HTTP
payload
This includes the request URL, query parameters, headers, and cookies
Provides reasonable guarantee that one is communicating with intended server and
the contents are not read/tampered in transit
THANK YOU