HTTP Notes
HTTP Notes
PONDU
MTECH CSE
1
Introduction
2
conti…
3
connections
4
Conti….
5
Methods
6
Conti…
7
conti…
• HEAD method:
asks for the message header, without the
actual page
used to get a page's time of last modification,
to collect information for indexing purposes
to test a URL for validity.
8
Conti….
• PUT method:
reverse of GET
instead of reading the page, it writes the page
makes it possible to build a collection of Web
pages on a remote server
request contains the page
It may be encoded using MIME
9
Conti….
• POST method:
PUT is similar to POST method.
bears a URL, but instead of replacing the
existing data, the new data is ''appended'' to it
neither PUT nor POST is used very much.
10
Conti….
• DELETE method:
it removes the page.
authentication and permission play a major
role
There is no guarantee that DELETE succeeds
Because even if the remote HTTP server is
willing to delete the page, the underlying file
may have a mode that forbids the HTTP
server from modifying
11
Conti….
• TRACE method:
for debugging
instructs the server to send back the request
useful when requests are not being
processed correctly and the client wants to
know what request the server actually got.
12
Conti….
• CONNECT method:
reserved for future use.
• OPTIONS method:
provides a way for the client to query the
server about its properties or those of a
specific file
13
The built-in HTTP request methods
Method Description
GET Request to read a Web page
14
Status lines
15
The status code response groups
16
Message Headers
17
HTTP message headers
Conti….
19
Conti….
20
Conti….
• If the server has a choice of pages, it can
use this information to supply the one the
client is looking for
• If it is unable to satisfy the request, an
error code is returned and the request fails
• Host header names the server
• It is taken from the URL
• This header is mandatory
21
Conti….
22
Conti….
23
Conti….
24
Conti….
• next four headers, all starting with
Content-, allow the server to describe
properties of page it is sending.
• Last-Modified header tells when the
page was last modified.
• This header plays an important role in
page caching.
25
Conti….
26
Conti….
27
THANK YOU
28