A convenience wrapper around an outgoing HTTP request.
- Inheritance
- Object
- Extensible
- ResponseContext
Static Methods
-
from(
HttpResponse response, Angel app) → Future<ResponseContext> -
Magically transforms an
HttpResponse
object into a ResponseContext.
Constructors
- ResponseContext(HttpResponse underlyingResponse)
Properties
- app → Angel
-
The Angel instance that is sending a response.
read / write -
Any and all cookies to be sent to the user.
read-only - hashCode → int
-
Get a hash code for this object.…
read-only, inherited - isOpen → bool
-
Can we still write to this response?
read / write - properties → Map
-
A set of custom properties that can be assigned to the server.…
read / write, inherited - responseData → List<List<int>>
-
A set of UTF-8 encoded bytes that will be written to the response.
read / write - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited - underlyingResponse → HttpResponse
-
The underlying
HttpResponse
under this instance.read / write - willCloseItself → bool
-
Set this to true if you will manually close the response.
read / write
Operators
-
operator ==(
other) → bool -
The equality operator.…
inherited
Methods
-
download(
File file, {String filename}) → dynamic -
Sends a download as a response.
-
end(
) → dynamic -
Prevents more data from being written to the response.
-
header(
String key, [String value]) → dynamic -
Sets a response header to the given value, or retrieves its value.
-
json(
value) → dynamic -
Serializes JSON to the response.
-
jsonp(
value, {String callbackName: "callback"}) → dynamic -
Returns a JSONP response.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.…
inherited -
redirect(
String url, {int code: 301}) → dynamic -
Redirects to user to the given URL.
-
redirectTo(
String name, [Map params, int code]) → dynamic -
Redirects to the given named Route.
-
render(
String view, [Map data]) → Future -
Renders a view to the response stream, and closes the response.
-
status(
int code) → dynamic -
Sets the status code to be sent with this response.
-
streamFile(
File file, {int chunkSize, int sleepMs: 0, bool resumable: true}) → Future -
Streams a file to this response as chunked data.…
-
toString(
) → String -
Returns a string representation of this object.
inherited -
write(
value) → dynamic -
Writes data to the response.