APIConfig constructor

APIConfig({
  1. String? baseUrl,
  2. Duration? connectTimeout = const Duration(seconds: 60),
  3. String? contentType,
  4. bool ensureNonNullHeadersFields = false,
  5. bool ensureNonNullParametersFields = false,
  6. Parameters? extra,
  7. bool? followRedirects,
  8. HTTPHeader? headers,
  9. bool isHandleErrors = false,
  10. bool isToastErrors = false,
  11. ListFormat? listFormat,
  12. int? maxRedirects,
  13. HTTPMethod? method = HTTPMethod.GET,
  14. bool? persistentConnection,
  15. bool postUseFormData = false,
  16. String prefixPath = '',
  17. bool preserveHeaderCase = false,
  18. Parameters? queryParameters,
  19. bool? receiveDataWhenStatusError,
  20. Duration? receiveTimeout = const Duration(seconds: 60),
  21. RequestEncoder? requestEncoder,
  22. ResponseDecoder? responseDecoder,
  23. ResponseType? responseType = ResponseType.json,
  24. Duration? sendTimeout,
  25. String suffixPath = '',
  26. ValidateStatus? validateStatus,
})

Implementation

APIConfig({
  this.baseUrl,
  this.connectTimeout = const Duration(seconds: 60),
  this.contentType,
  this.ensureNonNullHeadersFields = false,
  this.ensureNonNullParametersFields = false,
  this.extra,
  this.followRedirects,
  this.headers,
  this.isHandleErrors = false,
  this.isToastErrors = false,
  this.listFormat,
  this.maxRedirects,
  this.method = HTTPMethod.GET,
  this.persistentConnection,
  this.postUseFormData = false,
  this.prefixPath = '',
  this.preserveHeaderCase = false,
  this.queryParameters,
  this.receiveDataWhenStatusError,
  this.receiveTimeout = const Duration(seconds: 60),
  this.requestEncoder,
  this.responseDecoder,
  this.responseType = ResponseType.json,
  this.sendTimeout,
  this.suffixPath = '',
  this.validateStatus,
});