A web server, responding to a HTTP GET request sends the required content to the client. Normally we don't see what is sent between the web client and the server. However we can easily see what is sent by the server by telneting to that web server.
To connect to the web server - open a command line and type the command
telnet host porteg. telnet www.wso2.com 80Then you'll get connected to the particular web server and then you can enter any HTTP command you want such as GET, HEAD.
If you need to request for a web page from the web server you can type the HTTP request as follows.
GET pageName HTTP/1.0eg. GET /products HTTP/1.0Hit enter twice. Then you will get a response (if page exists)as follows.
HTTP/1.0 200 OK
Date: Thu, 30 Oct 2008 18:17:16 GMT
Server: Apache/2.2.9
X-Powered-By: PHP/5.2.6
Set-Cookie: PHPSESSID=5322082bf473207961031e3df1f45a22; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
X-Pingback: http://wso2.com/xmlrpc.php
Connection: close
Content-Type: text/html; charset=UTF-8
content goes here
.
.
.
You'll get a 404 status if page not found, 301 if the page is moved permanently and 401 if you are not authorized to access the page. More HTTP status codes can be found
here.
You can follow a similar way to issue other HTTP commands with the relevant content.