HTTPRetry class

A class wrapping all HTTP operations (GET, POST, PUT, DELETE) in a retry manner.

In case of network problems (SocketException or TimeoutException), this method will retry the HTTP operation N=15 times, with an increasing delay time as 2^(N+1) * 5 secs (20, 40, , ..., 10.240). I.e., maximum retry time is ca. three hours.

Constructors

HTTPRetry()

Properties

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

Methods

delete(String url, {Map<String, String>? headers}) Future<Response>
Sends an HTTP DELETE request with the given headers to the given url.
get(String url, {Map<String, String>? headers}) Future<Response>
Sends an HTTP GET request with the given headers to the given url.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post(String url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP POST request with the given headers and body to the given url.
put(String url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP PUT request with the given headers and body to the given url.
send(MultipartRequest request) Future<StreamedResponse>
Sends an generic HTTP MultipartRequest with the given headers to the given URL, which can be a Uri or a String.
toString() String
A string representation of this object.
inherited

Operators

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