Create a RedirectBrowserResponse.
Options for creating the RedirectBrowserResponse.
Protected_The content of the response.
Protected Optional_The status code of the response.
Protected Optional_The status message of the response.
ReadonlymetadataThe metadata associated with the event.
ReadonlyoriginalThe original content of the response.
ProtectedpreparedThe prepared status of the response.
Optional ReadonlysourceThe source of the event.
Optional ReadonlytargetReadonlytimeThe timestamp of the event creation.
ReadonlytypeThe type of the event.
Static ReadonlyOUTGOING_Static ReadonlyREDIRECT_Gets the content of the outgoing response.
The content of the outgoing response.
Gets the prepared status of the outgoing response.
The prepared status of the response.
Gets the status code of the outgoing response.
The status code of the response, or undefined if not set.
Gets the status message of the outgoing response.
The status message of the response, or undefined if not set.
Return a cloned instance.
The metadata container is deep-copied (plain objects and arrays are recreated,
special values kept by reference) so that mutating the clone's metadata — e.g. via
middleware — never leaks back into the original event. This is what makes the
Kernel's originalEvent snapshot a faithful pre-middleware copy.
A cloned instance of the current class.
Get data from metadata.
The key to retrieve from metadata.
The value associated with the key or the fallback.
Get data from metadata.
The key to retrieve from metadata.
The value associated with the key or the fallback.
Check if the given value is equal to the specified value.
The key to check.
The value to compare against.
True if the key's value is equal to the specified value, false otherwise.
Check if the status code represents an informational response (1xx).
True if the status code is informational, otherwise false.
Check if the status code represents a successful response (2xx).
True if the status code is successful, otherwise false.
Check if the status code represents a redirection response (3xx).
True if the status code is a redirection, otherwise false.
Check if the status code represents a client error response (4xx).
True if the status code is a client error, otherwise false.
Check if the status code represents a server error response (5xx).
True if the status code is a server error, otherwise false.
Check if the status code is an error (i.e., 4xx or 5xx).
True if the status code is an error, otherwise false.
Check if the status code is 403 (Forbidden).
True if the status code is 403, otherwise false.
Check if the status code falls within the specified range.
The starting value of the range (inclusive).
The ending value of the range (exclusive).
True if the status code is within the specified range, otherwise false.
Check if the status code is invalid.
True if the status code is invalid, otherwise false.
Check if the status code is not an error (i.e., not 4xx or 5xx).
True if the status code is not an error, otherwise false.
Check if the status code is 404 (Not Found).
True if the status code is 404, otherwise false.
Check if the status code is 200 (OK).
True if the status code is 200, otherwise false.
Check if the status code is 401 (Unauthorized).
True if the status code is 401, otherwise false.
Prepare response before sending it.
The incoming event associated with this response.
Optional_container: Container
The container.
This OutgoingResponse instance.
Set the content of the response.
The content to set.
This OutgoingResponse instance.
Add data to metadata.
The key or object to add to metadata.
Optionalvalue: unknown
The value to associate with the key.
This Event instance.
Set the prepared status of the response.
The prepared status to set.
This OutgoingResponse instance.
Set the status code of the response.
The status code.
Optionaltext: string
Optional status message.
This OutgoingResponse instance.
StaticcreateCreate an instance of RedirectBrowserResponse.
Options for the outgoing browser response.
A new instance of RedirectBrowserResponse.
StatictoCreate an instance of RedirectBrowserResponse from the given path or URL.
The path or URL to redirect to. If a string is provided, it will be treated as a relative path.
The HTTP status code for the redirect (default is 302).
A new instance of RedirectBrowserResponse.
Class representing a RedirectBrowserResponse.
Author
Mr. Stone evensstone@gmail.com