FailoverProxy class
Handles HTTP requests with automatic failover to the next server
Constructors
-
FailoverProxy(List<
String> urls)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
urls
→ List<
String> -
final
- workingUrl → String
-
Get the currently working URL
no setter
Methods
-
close(
) → void - Close the HTTP client
-
connectWs(
String wsUrl) → Future< String> - Test WebSocket connectivity to a URL Returns the URL if successful, throws otherwise
-
get(
String path) → Future< List< int> > - Make an HTTP GET request with failover support
-
getUrls(
) → List< String> - Get all URLs
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post(
String path, List< int> data) → Future<List< int> > - Make an HTTP POST request with failover support
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited