ResponseBuffered class
A response where the contents is buffered text.
The body is produced by one more more invocations of the write method, which appends String values to form the body. The encoding of the body is determined by the encoding specified to the constructor.
In the HTTP headers, a "Content-Type" header is automatically produced.
Do not use this type of response if the contents is binary data (i.e. not String) and/or needs to be streamed to the client. Use the ResponseStream for those types of responses.
Constructors
- ResponseBuffered(ContentType ct, {Encoding? encoding})
- Constructor
Properties
- contentType ↔ ContentType?
-
Content-type of the response.
getter/setter pairinherited
-
Cookies in the response.
finalinherited
- 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 pairinherited
- status ↔ int
-
HTTP status code.
getter/setter pairinherited
Methods
-
Set a cookie.
inherited
-
Delete a cookie.
inherited
-
finish(
Request req) → Future -
Method that is invoked at the end of creating the HTTP response.
inherited
-
headerAdd(
String name, String value) → void -
Adds a HTTP header
inherited
-
headerAddDate(
String name, DateTime date) → void -
Adds a HTTP header containing a RFC1123 formatted date.
inherited
-
headerExists(
String name) → bool -
Whether a header has been set or not.
inherited
-
headerNames(
) → Iterable< String> -
Header names
inherited
-
headerRemove(
String name, [String? value]) → bool -
Removes named header
inherited
-
headerRemoveAll(
) → void -
Remove all headers.
inherited
-
headerSet(
String name, String value) → void -
Sets a HTTP header
inherited
-
headerValues(
String name) → Iterable< String> ? -
Header values
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
write(
Object obj) → void - Append to the content.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited