Response class
Models an HTTP Response Steward processes this response and writes out the necessary data to the live HTTP response.
Constructors
- Response(int statusCode, {dynamic body, bool persistent = false})
- General constructor, sets the status code and body.
- Response.BadRequest([dynamic body])
- Constructor for 400 bad request responses.
- Response.Boom([dynamic body])
- Alternative Constructor for 500 internal server error responses.
- Response.Created([dynamic body])
- Constructor for 201 Created responses.
- Response.Forbidden([dynamic body])
- Constructor for 403 forbidden responses.
- Response.InternalServerError([dynamic body])
- Constructor for 500 internal server error responses.
- Response.NotFound([dynamic body])
- Constructor for 404 not found responses.
- Response.Ok([dynamic body])
- Constructor for 200 OK responses.
- Response.Redirect(String location)
- Constructor for 302 redirect responses.
- Response.RedirectForever(String location)
- Constructor for 303 redirect responses.
- Constructor for 401 unauthorized responses.
Properties
- body ↔ dynamic
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- headers ↔ Headers
-
getter/setter pair
- persistent ↔ bool
-
Whether the connection should be persistent or not
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode ↔ int
-
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setCookies(
List< Cookie> cookies) → void - Sets the cookies on the response as headers
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited