Hypertext Transfer Protocol (HTTP) Question: Download HTTP PDF

What is Representations in HTTP?

Tweet Share WhatsApp

Answer:

The HTTP client and HTTP server exchange information about resources identified by URLs.
We can sum up what we have learned so far in the following way: the HTTP client and HTTP server exchange information about resources identified by URLs.
We say that the request and response contain a representation of the resource. By representation, we mean information, in a certain format, about the state of the resource or how that state should be in the future. Both the header and the body are pieces of the representation.
The HTTP headers, which contain metadata, are tightly defined by the HTTP spec; they can only contain plain text, and must be formatted in a certain manner.
The body can contain data in any format, and this is where the power of HTTP truly shines. You know that you can send plain text, pictures, HTML, and XML in any human language. Through request metadata or different URLs, you can choose between different representations for the same resource. For example, you might send a webpage to browsers and JSON to applications.

Download HTTP PDF Read All 44 HTTP Questions
Previous QuestionNext Question
What is Idempotent methods in HTTP?What is HTTP Client Libraries?