RequestBuilderImpl class
Request builder implementation (Single Responsibility)
- Implemented types
Constructors
-
RequestBuilderImpl({required String baseUrl, Map<
String, String> defaultHeaders = const {'Accept' : 'application/json', 'Content-Type' : 'application/json'}, Duration defaultTimeout = const Duration(seconds: 30), int defaultMaxRetries = 3, List<int> defaultRetryStatusCodes = const [408, 502, 503, 504, 429]}) -
const
Properties
- baseUrl → String
-
final
-
defaultHeaders
→ Map<
String, String> -
final
- defaultMaxRetries → int
-
final
-
defaultRetryStatusCodes
→ List<
int> -
final
- defaultTimeout → Duration
-
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
-
build(
{required String method, required String path, Map< String, String> ? headers, Map<String, dynamic> ? queryParameters, dynamic body, Duration? timeout, bool? useToken, int? maxRetries, List<int> ? retryStatusCodes, bool? rethrowExceptions}) → HttpRequest -
Build HTTP request
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited