Http2ResponseContext class



Http2ResponseContext(Angel app, ServerTransportStream stream, Http2RequestContext _req)


app Angel
The Angel instance that is sending a response.
read / write, final, inherited-setter, override-getter
buffer → BytesBuilder
A set of UTF-8 encoded bytes that will be written to the response.
read-only, override
canPush → bool
Returns true if an attempt to push a resource will succeed. [...]
correspondingRequest RequestContext
Points to the RequestContext corresponding to this response.
read-only, override
isBuffered → bool
Returns true if response data is being written to a buffer, rather than to the underlying stream.
read-only, override
isOpen → bool
Returns true if the response is still available for processing by Angel. [...]
read-only, override
pushes → List<Http2ResponseContext>
Returns a List of all resources that have pushed to the client.
rawResponse ServerTransportStream
The underlying RawResponse under this instance.
read-only, override
stream ServerTransportStream
targetUri → Uri
chunked ↔ bool
Is Transfer-Encoding chunked?
read / write, inherited
contentLength ↔ int
Gets or sets the content length to send back to a client.
read / write, inherited
contentType MediaType
Gets or sets the content type to send back to a client.
read / write, inherited
cookies → List<Cookie>
Any and all cookies to be sent to the user.
final, inherited
done → Future
Return a future which is completed when the StreamSink is finished.
read-only, inherited
encoders → Map<String, Converter<List<int>, List<int>>>
A set of Converter objects that can be used to encode response data.
final, inherited
hashCode → int
The hash code for this object.
read-only, inherited
headers CaseInsensitiveMap<String>
Headers that will be sent to the user.
read-only, inherited
properties → Map
final, inherited
renderParams → Map<String, dynamic>
A Map of data to inject when res.render is called.
final, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
serializer ↔ FutureOr<String> Function(dynamic)
Serializes response data into a String.
read / write, inherited
statusCode ↔ int
This response's status code.
read / write, inherited


add(List<int> data) → void
Adds a data event to the sink. [...]
addError(Object error, [StackTrace stackTrace]) → void
Adds an error to the sink. [...]
addStream(Stream<List<int>> stream) → Future
Adds a stream directly the underlying response. [...]
close() → Future
Prevents more data from being written to the response, and locks it entire from further editing.
detach() ServerTransportStream
Signals Angel that the response is being held alive deliberately, and that the framework should not automatically close it. [...]
push(String path, {Map<String, String> headers: const {}, String method: 'GET'}) Http2ResponseContext
Pushes a resource to the client.
useBuffer() → void
Configure the response to write to an intermediate response buffer, rather than to the stream directly.
download(File file, {String filename}) → Future<void>
Sends a download as a response.
json(dynamic value) → void
Serializes JSON to the response.
jsonp(dynamic value, {String callbackName: "callback", MediaType contentType}) → Future<void>
Returns a JSONP response.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
redirect(dynamic url, {bool absolute: true, int code: 302}) → Future<void>
Redirects to user to the given URL.
redirectTo(String name, [Map params, int code]) → Future<void>
Redirects to the given named Route.
redirectToAction(String action, [Map params, int code]) → Future<void>
Redirects to the given Controller action.
render(String view, [Map<String, dynamic> data]) → Future<void>
Renders a view to the response stream, and closes the response.
serialize(dynamic value, {MediaType contentType}) → Future<bool>
Serializes data to the response.
streamFile(File file) → Future
Streams a file to this response.
toString() → String
Returns a string representation of this object.
write(Object value, {Encoding encoding}) → void
Writes data to the response.
writeAll(Iterable objects, [String separator = ""]) → void
Iterates over the given objects and writes them in sequence.
writeCharCode(int charCode) → void
Writes the charCode to this.
writeln([Object obj = ""]) → void
Converts obj to a String by invoking Object.toString and adds the result to this, followed by a newline.


operator ==(dynamic other) → bool
The equality operator.