HttpCall<R> class
Represents a simple HTTP call that can be called many times.
Constructors
- HttpCall({String? baseURL, HttpClient? client, HttpMethod method = HttpMethod.GET, String path = '', bool fullPath = false, Object? body, int maxRetries = 0})
Properties
- body → Object?
-
final
- client → HttpClient
-
final
- fullPath → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxRetries → int
-
final
- method → HttpMethod
-
final
- path → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
Map< String, dynamic> ? parameters, {Object? body, int? maxRetries}) → Future<HttpResponse?> - Performs a call, making the HTTP request.
-
callAndResolve(
Map< String, dynamic> ? parameters, {Object? body, int? maxRetries}) → Future<R?> - Performs a call, making the HTTP request, than resolves the response.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestHttpClient(
HttpClient client, HttpMethod method, String path, bool fullPath, Map? parameters, Object? body) → Future< HttpResponse> - Method responsible to request the HttpClient.
-
resolveResponse(
HttpResponse? response) → R? -
Method responsible to resolve the
response
to aR
value. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
toQueryParameters(
Map? parameters) → Map< String, String> ? -
toQueryParameterValue(
Object? value) → String