fake_http_client library

Classes

FakeHttpClient
A fake HttpClient for testing Flutter or Dart VM applications.
FakeHttpClientRequest
A fake implementation of HttpClientRequest.
FakeHttpHeaders
A fake implementation of HttpHeaders.
FakeHttpResponse
A fake HttpClientResponse to return in a RequestCallback.

Typedefs

AuthenticateCallback = Future<bool> Function(Uri, String, String)
A callback to simulate authentication.
AuthenticateProxyCallback = Future<bool> Function(String, int, String, String)
A callback to simulate proxy authentication.
BadCertificateCallback = dynamic Function(X509Certificate, String, int)
A callback to simulate a bad certificate.
FindProxyCallback = String Function(Uri)
Callback which can be invoked to resolve a proxy Uri.
RequestCallback = FutureOr<FakeHttpResponse> Function(FakeHttpClientRequest, FakeHttpClient)
Fakes a server response for the FakeHttpClient.