JokerResponse class
Response data that will be returned for a matched request
- Available extensions
Constructors
-
JokerResponse({int statusCode = 200, Map<
String, String> headers = const {}, dynamic body, Duration? delay}) -
Creates a response
const
-
JokerResponse.json(Map<
String, dynamic> json, {int statusCode = 200, Map<String, String> headers = const {}, Duration? delay}) -
Creates a successful response with JSON body
factory
-
JokerResponse.text(String text, {int statusCode = 200, Map<
String, String> headers = const {}, Duration? delay}) -
Creates a successful response with text body
factory
Properties
- body → dynamic
-
final
- bytes → Uint8List
-
Converts the body to bytes for HTTP response
no setter
- delay → Duration?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → 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