HTTP GET request

Suppose you want to fetch index.html from www.google.co.in

if you connect to proxy server (say 192.168.36.204 in our case ), say using
$ telnet 192.168.36.204 8080

then your request should be something like

GET http://www.google.co.in/index.html HTTP/1.0 (followed by two newlines)

If you can directly connect to www.google.co.in, say using
$ telnet www.google.co.in 80

then your request can be like

GET index.html HTTP/1.0 (followed by two newlines)

PS : If you are using shell, two newlines means pressing enter twice, and in the code newline means \n\n


Someone asked me about it through mail. Thought can post it to blog too. Its easy for me to refer, and helpful for others also.

Leave a Reply