Sending data through HTTP
HyperText Transfer Protocol (HTTP) is one of the foundation protocols of the internet. It has delivered us the World Wide Web since its creation.
Naturally, now it is one of the protocols used to communicate with IoT platforms.
HTTP works in a client-server architecture over TCP connections. By default, HTTP uses port 80
for listening to requests, but you can configure other TCP ports to run your web server.
The three main characteristics of HTTP are as follows:
- Connectionless: When a browser starts an HTTP request, wait for a response from the HTTP server. After the server processes the request, send a response to the client. Then, the connection ends, and all session data vanishes. The next time the client and server connect, they will start again from 0.
- Media independent: Different types of data can be transferred between the client and server, from text to media, or even binary files.
- Stateless: This is related to the connectionless...