Response class

Constructors

Response(int status, {Headers? headers, Stream<List<int>>? body, bool isStream = false})

Properties

body → Body?
no setter
hashCode → int
The hash code for this object.
no setterinherited
headers → Headers
final
isStream → bool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

json(Object? data, {int status = 200, Headers? headers}) → Response
redirect(String location, [int status = 302]) → Response
stream(void fn(StreamSink<List<int>>), {int status = 200, Headers? headers}) → Response
text(String s, {int status = 200, Headers? headers, Encoding encoding = utf8}) → Response