HttpClientFactory class final

Sends outgoing requests (one pooled dart:io client) or answers them from a fake. Registered as a singleton in the application container.

Constructors

HttpClientFactory({HttpClient clientFactory()?})

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
Closes pooled connections (called when the application shuts down).
fake(Map<String, Object> stubs) → HttpFake
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
preventStrayRequests(bool prevent) → void
request() → PendingRequest
restore() → void
Removes the fake (tests that share an application).
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited