Response class abstract

Abstract base class for a response.

The various handlers return a Future to an object based on this type. See the RequestHandler and ExceptionHandler typedefs.

Implementers

Constructors

Response()
Constructor

Properties

contentType ContentType?
Content-type of the response.
getter/setter pair
cookies List<Cookie>
Cookies in the response.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
session Session?
Gets the session.
getter/setter pair
status int
HTTP status code.
getter/setter pair

Methods

cookieAdd(Cookie cookie) → void
Set a cookie.
cookieDelete(String name, [String? path, String? domain]) → void
Delete a cookie.
finish(Request req) Future
Method that is invoked at the end of creating the HTTP response.
headerAdd(String name, String value) → void
Adds a HTTP header
headerAddDate(String name, DateTime date) → void
Adds a HTTP header containing a RFC1123 formatted date.
headerExists(String name) bool
Whether a header has been set or not.
headerNames() Iterable<String>
Header names
headerRemove(String name, [String? value]) bool
Removes named header
headerRemoveAll() → void
Remove all headers.
headerSet(String name, String value) → void
Sets a HTTP header
headerValues(String name) Iterable<String>?
Header values
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited