Saturday, May 2, 2015

HTTP Response

Some of the important parts of HTTP Response are:
Status Code – an integer to indicate whether the request was success or not. Some of the well
known status codes are 200 for success, 404 for Not Found and 403 for Access Forbidden.
 Content Type – text, html, image, pdf etc. Also known as MIME type 
 Content – actual data that is rendered by client and shown to user.

A sample HTTP response message is shown below:

200 OK
Date: Wed, 07 Aug 2013 19:55:50 GMT
Server: Apache-Coyote/1.1
Content-Length: 309
Content-Type: text/html;charset=US-ASCII

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Hello</title>
</head>
<body>
<h2>Hi There!</h2>
<br>
<h3>Date=Wed Aug 07 12:57:55 PDT 2013
</h3>
</body>
</html>





No comments:

Post a Comment

Contact Form

Name

Email *

Message *