- Mastering ASP.NET Web API
- Mithun Pattankar Malendra Hurbuns
- 121字
- 2021-07-02 20:52:23
Representations
A representation is a combination of the data you want to share and the metadata associated with it. The format of a representation is known as a media type. Media will be discussed in more detail later on in this chapter with some concrete examples. Media types are important when the server sends some data for the client to render; ideally, the server will send the media type first, which will describe to the client how the data should be rendered. As the client receives the data, it can start rendering the representation, which results in a better user experience. This is compared to the client receiving all the data and then receiving instructions on how to render the representation.