Content negotiation is basically a process of selecting the best representation from multiple representations that are available for a given response.
It simply allows one to choose rather than negotiate content that one wants to get in response. It is performed at the server-side. In simple words,
it chooses the best media type for matters to return a response to an incoming request.
There are two types of headers available for content negotiation:
- Content-Type: This header tells the server about the information that it will receive from the client.
- Accept: This header shows the data format requested by the client from the server.
- The resource
- The URL
- The representation