Firstly, fire up telnet with the hostname and port for the HTTP connection:
telnet www.somesite.com 80
If it can connect to the server, then you will be presented with:
Trying www.somesite.com...
Connected to www.somesite.com.
Escape character is '^]'.
Now type the following to request index.html over HTTP:
GET /index.html HTTP/1.1
host: www.somesite.com
This will then return the header information, followed by the actual data.
1 comment:
Do yourself a big favour and learn to use curl.
It's very rare to find a http webapp that doesn't need cookie support etc. and curl is a total doddle to it
curl http://foo.com/ is only a couple more characters than 'telnet foo.com 80', and you don't have to bother with manually typing headers :)
Post a Comment