ApiRequest<ResponseType, InnerType> constructor

ApiRequest<ResponseType, InnerType>({
  1. String? requestId,
  2. bool hasPagination = false,
  3. bool isMultipart = false,
  4. RetryPolicy? retryPolicy,
  5. bool? override500Error = true,
  6. Map<String, String> headers = const {},
  7. Map<String, dynamic> query = const {},
  8. ErrorDescription? error,
  9. String? nestedKey,
  10. String? method = ApiMethods.get,
  11. String dataKey = '',
  12. String paginationKey = '',
  13. List<ApiInterceptor> interceptors = const [],
  14. String path = '',
  15. required String baseUrl,
  16. int timeout = 50,
  17. Map<String, dynamic>? body,
})

Implementation

ApiRequest({
  String? requestId,
  this.hasPagination = false,
  this.isMultipart = false,
  this.retryPolicy,
  this.override500Error = true,
  this.headers = const {},
  this.query = const {},
  this.error,
  // ignore: deprecated_member_use_from_same_package
  this.nestedKey,
  this.method = ApiMethods.get,
  this.dataKey = '',
  this.paginationKey = '',
  this.interceptors = const [],
  this.path = '',
  required this.baseUrl,
  this.timeout = 50,
  this.body,
}) : requestId = requestId ?? UniqueKey().toString();