- Mastering ASP.NET Web API
- Mithun Pattankar Malendra Hurbuns
- 148字
- 2021-07-02 20:52:23
Resources and resource identifiers
A resource is a reference to any information that you wish to share. It could be a picture or a document that you wish to share with your friends. Roy T. Fielding sums up a resource quite precisely. A resource is a conceptual mapping to a set of entities, not the entity that corresponds to the mapping at any particular point in time. More precisely, a resource R is a temporally varied membership function Mr(r), which for time t maps to a set of entities, or values, which are equivalent. The values in the set may be resource representations and/or resource identifiers.
When a resource is used between components, a resource identifier is used by REST to know which resource it is.
Your resource should have a resource identifier when it is used between components, which is used by REST to identify your resource.