$ telnet google.com 80
Trying 142.250.70.238...
Connected to google.com.
Escape character is '^]'.
GET / HTTP/1.1
HTTP/1.1 200 OK
Then adding a couple of headers - and realising that it really was just text. You can really tell the difference with young developers who've made that leap. % openssl s_client -quiet -connect google.com:443
depth=2 OU = GlobalSign Root CA - R2, O = GlobalSign, CN = GlobalSign
verify return:1
depth=1 C = US, O = Google Trust Services, CN = GTS CA 1O1
verify return:1
depth=0 C = US, ST = California, L = Mountain View, O = Google LLC, CN = *.google.com
verify return:1
GET / HTTP/1.1
Connection: close
HTTP/1.1 200 OKI know that there are Reasons and blablabla but at an emotional level it's the end of an era, same to all these sites going React. The web used to be built on simple and easily-understandable tech, and now it just isn't.
No, HTTP is for TRANSFERRING hypertext. There is no reason that the transfer protocol needs to work in plain text (on top of TCP which isn't plain text either).
I was not suggesting to do an exercise. If the goal of your exercise is to show that the web is built off text being passed back and forth it can easily be shown by just looking at the network tab. From a web development perspective the exact details of how HTTP packets are encoded are not that important. For the same reason a deep knowledge of TCP is not really important.
My introduction to web programming was raw PHP and it removes any illusions about this stuff being fancy.
Granted, not everyone of them will really understand all the nuances of what I try to teach them, but hopefully they’ll get some of it, and be better professionals than without that knowledge.
I'm a Professor, I teach web development (to BSc and MSc students), and I always go through the "socket experience" before using any framework at all (usually Django, sometimes Flask). This lab exercise and another one for webservices (basically routing and sending json responses through the socket) are quite elucidative for them regarding web apps.
In the end, the message they get is that the internet is all text going back and forth (plus or minus some details).
[0] https://joaoventura.net/blog/2017/python-webserver/