In the 1991 HTTP was created. Web browsers used HTTP to fetch static HTML, text and images from web servers. These static files were sitting in a directory on a server. The only way to change the website was to update these files.
You could type a URL like http://acme.com/products.html
into a graphical web browser, the browser would then speak HTTP to the acme.com
server to fetch the /products.html
file. The user may then click a <a href="http://contoso.net/about.html">
to cause the browser to visit a different site, speaking HTTP to the contoso.net
server to fetch the /about.html
file.
The goal is to learn about HTTP, specifically what it does and what it looks like.
- What is an HTTP method?
- What is an HTTP status code?
- Identify the components of a URL, server, path.
- How does an HTTP server use the server and path from the URL?
python -mhttp.server
curl http://localhost:8000
to see the directory index generated by the web server.curl http://localhost:8000/demo.html
to see a file you created in the web server directory./hello.txt
, or /missing.txt
https://www.google.com
curl -v http://localhost:8000
nc localhost 8000
GET / HTTP/1.0
, then press return twiceGET /hello.txt
or other variations to see how the server responds.HTTP is just text! When you click a link, all that Firefox does is send this text to the server and display the result on the screen.