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
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
delete(
dynamic url, {Map< String, String> headers}) → Future<Response> -
Sends an HTTP DELETE request with the given headers to the given URL, which
can be a
Uri
or aString
. -
get(
dynamic url, {Map< String, String> headers}) → Future<Response> -
Sends an HTTP GET request with the given headers to the given URL, which can
be a
Uri
or aString
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
post(
dynamic url, {Map< String, String> headers, dynamic body, Encoding encoding}) → Future<Response> -
Sends an HTTP POST request with the given headers and body to the given URL,
which can be a
Uri
or aString
. -
put(
dynamic url, {Map< String, String> headers, dynamic body, Encoding encoding}) → Future<Response> -
Sends an HTTP PUT request with the given headers and body to the given URL,
which can be a
Uri
or aString
. -
send(
MultipartRequest request) → Future< StreamedResponse> -
Sends an generic HTTP
MultipartRequest
with the given headers to the given URL, which can be aUri
or aString
. -
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited