TestResponse class final
A simplified HTTP response returned by SparkyTestClient.
Constructors
-
TestResponse({required int statusCode, required String body, required Uint8List bodyBytes, required HttpHeaders headers, required List<
Cookie> cookies}) -
const
Properties
- body → String
-
The response body as a string.
final
- bodyBytes → Uint8List
-
The raw response body as bytes.
final
- contentType → ContentType?
-
The Content-Type of the response.
no setter
-
The response cookies.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headers → HttpHeaders
-
The response headers.
final
- jsonBody → dynamic
-
Parses the body as JSON.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → int
-
The HTTP status code.
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