HTTP
Hyper Text Transfer Protocol: A set of rules that govern how 2 devices should communicate with each other over the internet. Mainly between a client and a server.
Just like when humans communicate with each other on the phone following common social conventions; starting with a greeting, talking and responding, expecting a response, or not, and at the end of it all, saying farewells.
Also very similar to the communication environment in a court room. Where the judge won’t respond to an attorney shouting “hey!” or “no you didn’t!”, but would respond to a simple “objection!”. Likewise, in internet communication word choice matters.
HTTP is a plain text protocol, which means that messages sent using HTTP are directly readable, kind of like a text file on your computer.
Telnet
Telnet is a little piece of software that’s designed for connecting to and communicating with a remote device.
[Example#1]
$ telnet httpbin.org 80
Connected...
GET / HTTP/1.1
Host: httpbin.org
80
is the default port to the type of communication we’ll have with the web server, which is HTTP messaging.
GET / HTTP/1.1
Host: httpbin.org
The first line is called the request line. It will GET the content that is at the root – hence the / – using the 1.1 version of the HTTP protocol, from the host httpbin.org. This is exactly like navigating to www.httpbin.org in your browser.
[Example#2]
$ telnet httpbin.org 80
Connected...
GET /xml HTTP/1.1
Host: httpbin.org
This request line gets the resource at the address /xml on the host httpbin.org.
NOTE:
You may have used the slash notation / to refer to directories in the past. But this is not always the case when communicating with web servers.