Async::REST SourceAsyncRESTRepresentation

class Representation

A representation of a resource has a value at the time the representation was created or fetched. It is usually generated by performing an HTTP request.

REST components perform actions on a resource by using a representation to capture the current or intended state of that resource and transferring that representation between components. A representation is a sequence of bytes, plus representation metadata to describe those bytes. Other commonly used but less precise names for a representation include: document, file, and HTTP message entity, instance, or variant.

A representation consists of data, metadata describing the data, and, on occasion, metadata to describe the metadata (usually for the purpose of verifying message integrity). Metadata is in the form of name-value pairs, where the name corresponds to a standard that defines the value's structure and semantics. Response messages may include both representation metadata and resource metadata: information about the resource that is not specific to the supplied representation.

Nested

Definitions

def initialize(resource, value: nil, metadata: {})

Implementation

def initialize(resource, value: nil, metadata: {})
	@resource = resource
	
	@value = value
	@metadata = metadata
end