Sunday, June 23, 2013

Telnet and Curl to check the HTTP content.

Telnet and Curl to check the HTTP content.


Example 1.
=========================================
telnet: > telnet www.example.com http
telnet: Trying 192.0.2.2...
telnet: Connected to www.example.com.
telnet: Escape character is '^]'.
client: HEAD /example/example.shtml HTTP/1.1
client: Host: www.example.com
client: Connection: close
client: 
server: HTTP/1.1 200 OK
server: Date: Wed, 21 Jan 2004 22:13:05 GMT
server: Server: Apache/1.3.12-Turbo
server: Connection: close
server: Content-Type: text/html 
=========================================
Example 2.
 # telnet 171.189.222.30 30651
Trying 171.189.222.30...
Connected to 171.189.222.30.
Escape character is '^]'.
GET /monitor/bigip.html HTTP/1.0
Host: uat.example.com

HTTP/1.1 200 OK
Server: Sun-ONE-Web-Server/6.1
Date: Mon, 24 Jun 2013 02:46:18 GMT
Content-length: 9
Content-type: text/html
Last-modified: Wed, 19 Aug 2009 15:08:24 GMT
Accept-ranges: bytes
Connection: close

ServerUp
Connection closed by foreign host.
=========================================

Curl Example.

curl -v --header "Host: uat.example.com" --header "User-Agent: BigIP Prober" http://171.189.222.29:30651/monitor/bigip.html
curl -v --header "Host:
uat.example.com" --header "User-Agent: BigIP Prober" http://171.189.222.30:30651/monitor/bigip.html

=========================================


No comments:

Post a Comment