You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 6, 2020. It is now read-only.
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.
(Emphasis mine.)
Currently, nap doesn't enforce any structure on responses, and it's up to whoever responds to make sure that responses adhere to this structure. I think we can go a step further and make sure response handlers return messages which include both headers and the body. We don't have to include any headers, and we don't have to verify that they are correct -- both of these could, and probably should, be the responsibility of middleware -- but we can and should make sure the message itself has the correct format. Possibly, this is a much larger discussion, which should also involve how we do async control flow in the first place.
The text was updated successfully, but these errors were encountered:
Fielding's dissertation states:
(Emphasis mine.)
Currently, nap doesn't enforce any structure on responses, and it's up to whoever responds to make sure that responses adhere to this structure. I think we can go a step further and make sure response handlers return messages which include both headers and the body. We don't have to include any headers, and we don't have to verify that they are correct -- both of these could, and probably should, be the responsibility of middleware -- but we can and should make sure the message itself has the correct format. Possibly, this is a much larger discussion, which should also involve how we do async control flow in the first place.
The text was updated successfully, but these errors were encountered: