any method

Future<Response> any(
  1. String url,
  2. NetworkTypeDio type, {
  3. Map<String, dynamic>? body,
  4. Map<String, String>? headers,
  5. NetworkRequestFile? requestFile,
  6. ProgressCallbackFastor? onSendProgress,
  7. ProgressCallbackFastor? onReceiveProgress,
  8. bool? isEnableLogDioPretty,
  9. int? timeOutSecond,
  10. bool? handleErrorXMLHttpRequest,
  11. NetworkDiocallback_dio? callback,
})

Implementation

Future<Response> any(String url,
    NetworkTypeDio  type,
    {Map<String, dynamic>? body,
      Map<String, String>? headers,

      /// file
      NetworkRequestFile? requestFile,
     ProgressCallbackFastor? onSendProgress,
      ProgressCallbackFastor? onReceiveProgress,

      bool? isEnableLogDioPretty ,
      int?  timeOutSecond,
      bool?  handleErrorXMLHttpRequest,
      NetworkDiocallback_dio? callback}) async {

  //set values
  this.url = url;
  this.type = type;
  this.requestFile = requestFile;
  this.callback_dio = callback;
  this.timeOutSecond = timeOutSecond;

  //handleErrorXMLHttpRequest
  handleErrorXMLHttpRequest ??= false;
  this.handleErrorXMLHttpRequest = handleErrorXMLHttpRequest;

  //log
  isEnableLogDioPretty ??= true;
  this.isEnableLogDioPretty = isEnableLogDioPretty;

  //set body and header
  if (body != null) this.body = body;
  if (headers != null) this.headers = headers;

  //set values
  this.url = url;
  this.type = type;

  //set body and header
  if (body != null) this.body = body;
  if (headers != null) this.headers = headers;

  //edit headers
  this.headers = setDefaultHeader(headers);

  _setupNetworkTypeDefault();

  _configureSetup();

  //choose type
  return await _chooseTypeNetworkThenStartService( onSendProgress: onSendProgress, onReceiveProgress: onReceiveProgress );
}