ExecuteRequestUseCase class
Use case for executing HTTP requests (Single Responsibility)
This class encapsulates the business logic for making HTTP requests. It acts as an intermediary between the presentation layer and the data layer, ensuring that the business rules are properly applied.
Constructors
- ExecuteRequestUseCase(NetworkRepository _repository)
-
Creates a new ExecuteRequestUseCase with the given NetworkRepository.
const
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
-
delete<
T> (String path, {Map< String, String> ? headers, Map<String, dynamic> ? queryParameters, Duration? timeout, bool? useToken, int? maxRetries, List<int> ? retryStatusCodes, T parser(dynamic)?}) → Future<HttpResponse< T> > - Execute DELETE request
-
get<
T> (String path, {Map< String, String> ? headers, Map<String, dynamic> ? queryParameters, Duration? timeout, bool? useToken, int? maxRetries, List<int> ? retryStatusCodes, T parser(dynamic)?}) → Future<HttpResponse< T> > - Execute GET request
-
head(
String path, {Map< String, String> ? headers, Map<String, dynamic> ? queryParameters, Duration? timeout, bool? useToken}) → Future<HttpResponse< Map< >String, String> > - Execute HEAD request
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patch<
T> (String path, {dynamic body, Map< String, String> ? headers, Map<String, dynamic> ? queryParameters, Duration? timeout, bool? useToken, int? maxRetries, List<int> ? retryStatusCodes, T parser(dynamic)?}) → Future<HttpResponse< T> > - Execute PATCH request
-
post<
T> (String path, {dynamic body, Map< String, String> ? headers, Map<String, dynamic> ? queryParameters, Duration? timeout, bool? useToken, int? maxRetries, List<int> ? retryStatusCodes, T parser(dynamic)?}) → Future<HttpResponse< T> > - Execute POST request
-
put<
T> (String path, {dynamic body, Map< String, String> ? headers, Map<String, dynamic> ? queryParameters, Duration? timeout, bool? useToken, int? maxRetries, List<int> ? retryStatusCodes, T parser(dynamic)?}) → Future<HttpResponse< T> > - Execute PUT request
-
request<
T> (HttpMethod method, String path, {dynamic body, Map< String, String> ? headers, Map<String, dynamic> ? queryParameters, Duration? timeout, bool? useToken, int? maxRetries, List<int> ? retryStatusCodes, T parser(dynamic)?}) → Future<HttpResponse< T> > - Execute custom request
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited