Hello there! This is a sample lesson. To see the highlighting/comment feature in use, highlight text and click the desired action. This will ping the data to the backend server where it can be sifted for insights. Enter a username to try it out:
HTTP is the protocol which powers the web. Every time you visit a website you are making HTTP requests, and receiving responses from a server. Visit httpbin.
Congratulations! You just made an HTTP request. So, what happened there?
The browser sends a request, using the HTTP protocol, to the server at the location httpbin.org and requests the /ip endpoint. You sent a request to httpbin, and a Domain Name Server pointed your request to a numeric IP address. On the httpbin server, there is a program set up to respond whenever a client (that's you!) sends a request. In the case of the /ip endpoint, the server simply reads the IP address of the client and sends it back in JSON format.
This example illustrates a dynamic site: the response depends on information provided by the client; in this case your IP address. This is as opposed to a static site, which simply responds with pre-generated HTML files for viewing or downloading. It also shows the foundational architecture of the Internet. There is a client, in this case your computer, sending a request to a server, in this case httpbin.org, and getting a response. Whenever you open a web page or do anything on the Internet that loads data to or from somewhere else, there is a client-server interaction going on somewhere. When the server responds, it sends a status code. There are many codes, and they all have different meanings, but you will likely only encounter a few.