Introduction
In the previous chapter, we saw how to contact a remote server in order to obtain some information, but now we will dig into how the remote server is created, so if you already know how to request information, now you will see how to reply to these requests.
A web server is a program that uses the HTTP protocol, hence, the HTTP server, to accept requests from any HTTP client (web browser, another program, and so on) and respond to them with an appropriate message. When we browse the internet with our browser, it will be an HTTP server that will send an HTML page to our browser and we will be able to see it. In some other cases, a server will not return an HTML page but a different message, appropriate to the client.
Some HTTP servers provide an API that can be consumed by another program. Think of when you want to register with a website, and you are asked if you want to sign up through Facebook or Google. This means that the website you want to register with will...