PendingRequest class
A captured request that tests must match and complete or cancel.
Constructors
- PendingRequest(HttpRequest request, CancellationToken token)
Properties
- completed → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- matched ↔ bool
-
getter/setter pair
- request → HttpRequest
-
final
-
response
→ Future<
HttpResponse> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- token → CancellationToken
-
final
Methods
-
fail(
Object error, [StackTrace? stackTrace]) → void -
flush(
HttpResponse response) → void -
flushJson(
Object? value, {int statusCode = 200, Map< String, String> headers = const {}}) → void - Completes with UTF-8 JSON, defaulting to HTTP 200 and JSON content type.
-
flushText(
String text, {int statusCode = 200, Map< String, String> headers = const {}}) → void - Completes with UTF-8 text; custom headers override default content type.
-
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