_
06-Jan-2009 | 23:04:29

News:

.



Bookmark Page
Bookmark on digg Bookmark on deli.cio.us Bookmark on reddit Bookmark on Technorati Bookmark on stumbleupon Bookmark on Google Bookmark on Yahoo MyWeb

HTTP Request Types

HTTP Requests

Request Description
GET Requests a page from the server. This is the normal request used when browsing web pages.
HEAD Like GET, but returns the response header information and not the page content itself. This can be used to obtain information about a page, such as when it was last modified.
POST This request is used to pass information to the server. Its most common use is with HTML forms.
PUT Used to put a new web page on a server. Usually, this request type is not used because of the security implications allowing a client to change a web page.
DELETE Used to delete a web page from the server. This request is usually not used because of the security implications of permitting a client to delete content.
CONNECT Intended for use with proxy servers and not applicable to ordinary web servers.
OPTIONS Intended for use with the web server, listing the supported options.
TRACE This is used to request that the server send back the request header to the client in the body of the response, and to check that a connection can be made to the server. This has implications for XSS cross site scripting.
Last-Modified Defines the date when the HTML was last modified (from the time stamp on the HTML file)

Selected HTTP Responses

Response Description
200 OK Standard response for the successful request of a page.
301 Moved Permanently The requested resource has been moved to a new location. The Location header indicates the URI of the new location. The client should request the page from this new URI.
304 Not Modified This is returned when a client requests a page and specifies the If-modified-since header in the request. The server will return code 304 rather than 200 if the page has not changed since the indicated modification date. This protocol is used to improve efficiency when a browser is caching local copies of web pages.
307 Temporary Redirect The requested resource has been temporarily moved to a new location. The Location header indicates the URI of the new location. The client should request the page from this new URI.
401 Unauthorized Used when a client is not authorized to access a resource.
403 Forbidden Access to the resource is denied, and the server might supply further information in the response body.
404 Not Found The requested URI was not found on the server. This response might also be used to deny access without giving further information.
414 Request-URI Too Long This is returned when a GET URI is too long for the server to process.
500 Internal Server Error Unknown internal error.
503 Service Unavailable This can be used by a servlet to show that an external resource (perhaps a database) is not available. The client can retry the request at a later time.

Selected Header Fields

Header Field Description
If-Modified-Since Defines the date of the cached copy of the page.
If-None-Match Defines the Entity Tag for the cached copy of the page.