ResponseStream class

A response where the contents come from a stream.

Use this type of response when the content contains binary data and/or the contents is to be streamed.

Use this type of response when the content is produced as a Stream. If the contents is a stream of text (String), use this type of response, but produce a binary stream by converting the String into binary data using the String.codeUnits method.

Inheritance

Constructors

ResponseStream(ContentType ct)
Constructor.

Properties

contentType ↔ ContentType
Content-type of the response.
read / write, inherited
cookies → List<Cookie>
Cookies in the response.
final, inherited
hashCode → int
The hash code for this object. [...]
read-only, inherited
headers → Map<String, List<String>>
HTTP headers in the response.
final, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
status ↔ int
HTTP status code. [...]
read / write, inherited

Methods

addStream(Request req, Stream<List<int>> stream) → Future<ResponseStream>
Provide a stream that produces the content. [...]
cookieAdd(Cookie cookie) → void
Set a cookie. [...]
inherited
cookieDelete(String name, [ String path, String domain ]) → void
Delete a cookie.
inherited
finish(Request req) → Future
Method that is invoked at the end of creating the HTTP response. [...]
inherited
Set a HTML header [...]
inherited
headerAdd(String name, String value) → void
Set a HTTP header
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited