Ever wanted to be a real web geek?
Well, you can get one step closer by following these steps and browse a website using a Telnet session via the Windows(R) DOS terminal.
Believe it or not you can actually use this method to diagnose HTTP issues, and it also provides an insite into how the HyperText Tranfer Protocol (HTTP) works.
HTTP Request using Telnet
- Open a DOS prompt by clicking Start > Run and typing CMD and hitting Enter.
- Clear your screen of commands by typing CLS and pressing Enter.
- Start a Telnet session by typing telnet and pressing Enter.
- Configure the Telnet session to echo typed characters to the screen by typing set localecho.
- Instruct Telnet how you want to handle the Enter key by typing set crlf.
- Open up a connection to the site you want over HTTP port 80, by typing o nikmakris.com 80.
- Press Enter several times until the cursor lands on an empty line and then request a page from the site.
- Type the following carefully without making errors:
GET / HTTP/1.1
- Then press Enter twice and you should receive the HTML response for the page you just requested from the web server, delivered to you by HTTP!
Here's what you should have typed, and the response from the DOS terminal and Telnet session. I've ommited the verbose HTML response from the web server.
Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'
Microsoft Telnet> set localecho
Local echo on
Microsoft Telnet> set crlf
New line mode - Causes return key to send CR & LF
Microsoft Telnet> o nikmakris.com 80
Connecting To nikmakris.com...
GET / HTTP/1.1