Response<ValueType> class
abstract
HTTP response. A route handler must respond to HTTP requests by producing a Response object.
ValueType
specializes the value contained by it.
writeResponse can be used to write response to underlying abstracted response object.
- Implementers
Constructors
Properties
- body ↔ ValueType?
-
Body of the response
getter/setter pair
-
Cookies
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headers → JaguarHttpHeaders
-
Headers
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode ↔ int
-
Status code of the response
getter/setter pair
Methods
-
deleteCookie(
String name, {String path = '/'}) → void -
deleteCookie deletes a cookie with given
name
. Usepath
to specify the path from which the cookie has to be removed. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
writeAllButBody(
HttpResponse resp) → void -
writeResponse(
HttpResponse resp) → FutureOr< void> - Writes body of the HTTP response from body property
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
html(
String html, {int statusCode = HttpStatus.ok, Map< String, dynamic> ? headers, String mimeType = MimeTypes.html, String charset = kDefaultCharset, List<Cookie> ? cookies}) → StringResponse -
json<
ST> (ST value, {dynamic serializeWith(ST value)?, int statusCode = HttpStatus.ok, Map< String, dynamic> ? headers, String mimeType = MimeTypes.json, String charset = kDefaultCharset, List<Cookie> ? cookies}) → StringResponse