Readonly contentReadonly metadataThe metadata for the response. This is used to set the revalidation times and other metadata.
Static Readonly EMPTYA render result that represents an empty response. This is used to represent a response that was not found or was already sent.
Returns false if the response is a string. It can be a string if the page was prerendered. If it's not, then it was generated dynamically.
Returns true if the response is null. It can be null if the response was not found or was already sent.
Pipes the response to a writable stream. This will close/cancel the writable stream if an error is encountered. If this doesn't throw, then the writable stream will be closed or aborted.
Writable stream to pipe the response to
Chains a new stream to the response. This will convert the response to an array of streams if it is not already one and will add the new stream to the end. When this response is piped, all of the streams will be piped one after the other.
The new stream to chain
Returns the response if it is a string. If the page was dynamic, this will
return a promise if the stream option is true, or it will throw an error.
Optional stream: falseWhether or not to return a promise if the response is dynamic
The response as a string
Unshifts a new stream to the response. This will convert the response to an array of streams if it is not already one and will add the new stream to the start of the array. When this response is piped, all of the streams will be piped one after the other.
The new stream to unshift
Static fromCreates a new RenderResult instance from a static response.
the static response value
the content type of the response
a new RenderResult instance
The detected content type for the response. This is used to set the
Content-Typeheader.