The response returned by a Handler
.
- Inheritance
- Object
- Message
- Response
Constructors
- Response(int statusCode, {body, Map<String, String> headers, Encoding encoding, Map<String, Object> context})
-
Constructs an HTTP response with the given statusCode.…
- Response.forbidden(body, {Map<String, String> headers, Encoding encoding, Map<String, Object> context})
-
Constructs a 403 Forbidden response.…
- Response.found(location, {body, Map<String, String> headers, Encoding encoding, Map<String, Object> context})
-
Constructs a 302 Found response.…
- Response.internalServerError({body, Map<String, String> headers, Encoding encoding, Map<String, Object> context})
-
Constructs a 500 Internal Server Error response.…
- Response.movedPermanently(location, {body, Map<String, String> headers, Encoding encoding, Map<String, Object> context})
-
Constructs a 301 Moved Permanently response.…
- Response.notFound(body, {Map<String, String> headers, Encoding encoding, Map<String, Object> context})
-
Constructs a 404 Not Found response.…
- Response.notModified({Map<String, String> headers, Map<String, Object> context})
-
Constructs a 304 Not Modified response.…
- Response.ok(body, {Map<String, String> headers, Encoding encoding, Map<String, Object> context})
-
Constructs a 200 OK response.…
- Response.seeOther(location, {body, Map<String, String> headers, Encoding encoding, Map<String, Object> context})
-
Constructs a 303 See Other response.…
Properties
- contentLength → int
-
The contents of the content-length field in
headers
.…read-only, inherited - context → Map<String, Object>
-
Extra context that can be used by for middleware and handlers.…
read-only, inherited - encoding → Encoding
-
The encoding of the message body.…
read-only, inherited - expires → DateTime
-
The date and time after which the response's data should be considered stale.…
read-only - hashCode → int
-
Get a hash code for this object.…
read-only, inherited - headers → Map<String, String>
-
The HTTP headers.…
read-only, inherited - lastModified → DateTime
-
The date and time the source of the response's data was last modified.…
read-only - mimeType → String
-
The MIME type of the message.…
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited - statusCode → int
-
The HTTP status code of the response.
read-only
Operators
-
operator ==(
other) → bool -
The equality operator.…
inherited
Methods
-
change(
{Map<String, String> headers, Map<String, Object> context, body}) → Response -
Creates a new Response by copying existing values and applying specified changes.…
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.…
inherited -
read(
) → Stream<List<int>> -
Returns a
Stream
representing the body.…inherited -
readAsString(
[Encoding encoding]) → Future<String> -
Returns a
Future
containing the body as a String.…inherited -
toString(
) → String -
Returns a string representation of this object.
inherited