There have been a lot of questions regarding using telnet to issue HTTP requests.
For example, here is one thread with many answers regarding the use of Microsoft/Windows telnet: http://forums.udacity.com/cs253-april2012/questions/65/microsoft-telnet
A lot of people have been having problems with it, or have been unable to install the telnet client on Windows 7.
An alternative is to use PuTTY, a free telnet client: http://www.chiark.greenend.org.uk/~sgtatham/putty/
Here are some instructions to use PuTTY to connect to web servers and send HTTP requests.
Note: These instructions were developed on Windows. Putty is also available for Unix systems, but if you're using Linux, you likely already have a built-in telnet program, or you know what you're doing.
The window closes right away!
Make sure you have Close window on exit set to Never. Otherwise, once the HTTP response is received, Putty feels that the session has closed properly and will close the window.
I get a 400 Bad Request error in my HTTP response
Make sure you have Telnet negotiation mode set to Passive under Connection > Telnet in your configuration.
I get a 404 Not Found error in my HTTP response
Did you forget to include
I was wondering:
Is it possible to keep the Telnet connection open until you exit PuTTY manually (e.g.: Alt+F4)?
I wish to use PuTTY to view multiple HTTP request/response pairs without having to start a new Telnet session each time. Am I hoping in vain here?
Any help would be much appreciated. :)
answered 12 Sep, 23:22
thanks for the post...itz really very helpfull....was banging my head unil got here....
answered 18 Aug, 12:38
it worked for me after several trials, i discover that you must follow the syntax i.e GETspace/spaceHTTP/1.0 i.e GET / HTTP/1.0. Thank you all
answered 07 Aug, 05:58
FINALLY GOT THIS TO WORK! the putty settings made all the diff. however as of today 8/3/13 the url is NOT www.udacity.com. when i tried to interact with that location 301 code was returned, server permanently moved. when i tried connecting to www. example.com 80 and then used Host: www.example.com IT WORKED!!!! took me about 3 days to get this. i also sent output to a log file which is tremendously helpful.
GET / HTTP/1.0
HTTP/1.0 200 OK
This domain is established to be used for illustrative examples in documents. You may use this
answered 03 Aug, 13:15
Thank you. Now I can shower and shave and try to get my wife back.
answered 22 May, 09:33
anyone else get a 301 moved permanently?
answered 03 Feb, 15:58
Thanks so much. It works!!!! This is an excellent post :-)
answered 20 Mar, 09:07
Hi when i type this line GET /HTTP/1.0 and press enter or sift+enter, it just immediately closes the connection and i get the 400 error, if instead press control+enter after typing the first line, i get the <!DOCTYPE HTML> and a long screen of text that at the end reads The requested URL HTTP/1.0 was not found, i have tried with HTTP/1.1 and i get the same it never lets me type in the second line Host: www.udacity.com whenever i try to put a line break, this is freaking me out.........why is it not letting me type this second line Host: www.udacity.com after the line break
answered 19 Feb, 02:41
you are my hero... using telnet in windows gave me a headache last week.
answered 05 Jan, 09:36
Thanks! This method worked for me too. :)
answered 18 Nov '12, 13:16