Class: OutgoingBrowserResponse
Class: OutgoingBrowserResponse
Extends
OutgoingResponse
Extended by
Constructors
Constructor
new OutgoingBrowserResponse(options): OutgoingBrowserResponse;
Constructor for OutgoingBrowserResponse. Initializes headers and cookies based on the provided options.
Parameters
options
OutgoingBrowserResponseOptions
Options for the outgoing browser response.
Returns
OutgoingBrowserResponse
Overrides
OutgoingResponse.constructor
Properties
OUTGOING_BROWSER_RESPONSE
static OUTGOING_BROWSER_RESPONSE: string = 'stonejs@outgoing_browser_response';
Methods
is1xx()
is1xx(): boolean;
Check if the status code represents an informational response (1xx).
Returns
boolean
True if the status code is informational, otherwise false.
is2xx()
is2xx(): boolean;
Check if the status code represents a successful response (2xx).
Returns
boolean
True if the status code is successful, otherwise false.
is3xx()
is3xx(): boolean;
Check if the status code represents a redirection response (3xx).
Returns
boolean
True if the status code is a redirection, otherwise false.
is4xx()
is4xx(): boolean;
Check if the status code represents a client error response (4xx).
Returns
boolean
True if the status code is a client error, otherwise false.
is5xx()
is5xx(): boolean;
Check if the status code represents a server error response (5xx).
Returns
boolean
True if the status code is a server error, otherwise false.
isError()
isError(): boolean;
Check if the status code is an error (i.e., 4xx or 5xx).
Returns
boolean
True if the status code is an error, otherwise false.
isForbidden()
isForbidden(): boolean;
Check if the status code is 403 (Forbidden).
Returns
boolean
True if the status code is 403, otherwise false.
isInStatusRange()
isInStatusRange(start, end): boolean;
Check if the status code falls within the specified range.
Parameters
start
number
The starting value of the range (inclusive).
end
number
The ending value of the range (exclusive).
Returns
boolean
True if the status code is within the specified range, otherwise false.
isInvalid()
isInvalid(): boolean;
Check if the status code is invalid.
Returns
boolean
True if the status code is invalid, otherwise false.
isNotError()
isNotError(): boolean;
Check if the status code is not an error (i.e., not 4xx or 5xx).
Returns
boolean
True if the status code is not an error, otherwise false.
isNotFound()
isNotFound(): boolean;
Check if the status code is 404 (Not Found).
Returns
boolean
True if the status code is 404, otherwise false.
isOk()
isOk(): boolean;
Check if the status code is 200 (OK).
Returns
boolean
True if the status code is 200, otherwise false.
isUnauthorized()
isUnauthorized(): boolean;
Check if the status code is 401 (Unauthorized).
Returns
boolean
True if the status code is 401, otherwise false.
create()
static create(options): OutgoingBrowserResponse;
Create an instance of OutgoingBrowserResponse.
Parameters
options
OutgoingBrowserResponseOptions
Options for the outgoing browser response.
Returns
OutgoingBrowserResponse
A new instance of OutgoingBrowserResponse.
Overrides
OutgoingResponse.create