ApiRequest<ResponseType, InnerType> class

Constructors

ApiRequest({String? requestId, bool hasPagination = false, bool isMultipart = false, RetryPolicy? retryPolicy, bool? override500Error = true, Map<String, String> headers = const {}, Map<String, dynamic> query = const {}, ErrorDescription? error, String? nestedKey, String? method = ApiMethods.get, String dataKey = '', String paginationKey = '', List<ApiInterceptor> interceptors = const [], String path = '', required String baseUrl, int timeout = 50, Map<String, dynamic>? body})
ApiRequest.dummy()
factory

Properties

baseUrl → String
final
body → Map<String, dynamic>?
final
build → Future<ApiRequest<ResponseType, InnerType>>
Runs the onRequest interceptors and returns the resulting request.
no setter
dataKey → String
Dotted path to the payload, resolved from the root of the body.
final
error → ErrorDescription?
final
hashCode → int
The hash code for this object.
no setterinherited
hasPagination → bool
final
headers → Map<String, String>
final
interceptors → List<ApiInterceptor>
final
isMultipart → bool
final
method → String?
final
nestedKey → String?
Dotted path to the envelope that scopes dataKey and pagination.
final
override500Error → bool?
final
paginationKey → String
Dotted path to the object carrying the pagination fields, resolved from the root of the body.
final
path → String
final
query → Map<String, dynamic>
final
requestId → String
an ID used to track individual requests
final
retryPolicy → RetryPolicy?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timeout → int
final
uri → Uri
no setter

Methods

copyWith({String? method, String? path, String? dataKey, String? paginationKey, String? baseUrl, bool? hasPagination, RetryPolicy? retryPolicy, int? timeout, bool? override500Error, bool? isMultipart, Object? body = _unset, Map<String, String>? headers, List<ApiInterceptor>? interceptors, Object? error = _unset, Object? nestedKey = _unset, Map<String, dynamic>? query}) → ApiRequest<ResponseType, InnerType>
Note: interceptors are appended to the existing chain rather than replacing it, so an interceptor can add another without discarding the ones already configured on the request.
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