StreamResponse class

Response that writes the stream of bytes provided in value to the response.

Inheritance

Constructors

StreamResponse(Stream<List<int>> value, {dynamic statusCode: 200, Map<String, dynamic> headers, String mimeType, String charset})
StreamResponse.fromFile(File file, {dynamic statusCode: 200, Map<String, dynamic> headers, String mimeType, String charset})
Response that writes the contents of file to the response.
factory
StreamResponse.fromStrings(Stream<String> strings, {dynamic statusCode: 200, Map<String, dynamic> headers, String mimeType, String charset, Encoding encoding: utf8})
Response that writes the strings to the response.
factory

Properties

cookies List<Cookie>
Cookies
final, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
headers JaguarHttpHeaders
Headers
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
statusCode int
Status code of the response
read / write, inherited
value Stream<List<int>>
Body of the response
read / write, inherited

Methods

deleteCookie(String name, {String path: '/'}) → void
deleteCookie deletes a cookie with given name. Use path to specify the path from which the cookie has to be removed.
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
writeAllButBody(HttpResponse resp) → void
inherited
writeResponse(HttpResponse resp) Future<void>
Writes body of the HTTP response from value property [...]
override

Operators

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

Static Methods

fromPath(String path, {int statusCode: 200, Map<String, dynamic> headers, String mimeType, String charset}) Future<StreamResponse>
Response that writes the contents of file at path to the response.