HttpRecorder class
Configures an HTTP client that can record and replay HTTP responses, for more repeatable and less flakey tests.
This class can setup and configure the default HTTP client, using one of the run, testRecording, or testRecordingWidgets functions.
Constructors
-
HttpRecorder({bool? isUpdatingRecordings, Codec<
List< ? bodyEncoding, HttpOverrides? httpOverrides})int> , String>
Properties
-
bodyEncoding
↔ Codec<
List< ?int> , String> -
Encoding to be used when storing the body of an http response in a
json file.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpOverrides → HttpOverrides?
-
The Http override to be used when creating the source client that makes
the actual Http network requests.
final
- isUpdatingRecordings → bool
-
Whether the recordings are being updated.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run<
T> (RecordingTesterCallback< T> body) → T -
setupRecordingOnDrawFrame(
) → void - Setup the Http recording client to be available on every frame draw.
-
tearDownRecordingOnDrawFrame(
) → void - Tear down the setup that was done by setupRecordingOnDrawFrame.
-
testRecording(
String description, RecordingTesterCallback body, {bool? skip, Object? tags = defaultRecorderTagObject}) → void -
testRecordingWidgets(
String description, RecordingWidgetTesterCallback test, {bool useFakeAsync = false, bool? skip, Object? tags = defaultRecorderTagObject}) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited