HTTP compression
In order to get content quickly from a REST service, data can be compressed and sent over protocols such as HTTP. While compressing data, we will have to follow some encoding format, so the same format will be applied on the receiver side.
Content negotiation
While requesting a resource in the server, the client will have many options to receive the content in various representations. For example, DOC/PDF is the data type representation. Turkish or English is the language representation, where the server can send the resource in a particular language. There must be some agreement between the server and the client about which format the resource will be accessed in, such as language, data type, and so on. The process is called content negotiation.
Here, we will talk about two different content negotiation mechanisms: server-driven and agent-driven mechanisms. Before moving on to these mechanisms, we will talk about Accept-Encoding and Content-Encoding, as they are important...