
import 'package:dio/dio.dart';
import 'i_form_data.dart';
import 'i_http_response.dart';

abstract class IHttpClient {
  Future<void> init();

  Future<IHttpResponse<T>> get<T>(
      String path, {
        Map<String, dynamic>? queryParameters,
        Map<String, String>? headers,
        ProgressCallback? onReceiveProgress,
      });


  Future<IHttpResponse<T>> post<T>(
    String path, {
    dynamic data,
    Map<String, dynamic>? queryParameters,
    Map<String, String>? headers,
    ProgressCallback? onSendProgress,
    ProgressCallback? onReceiveProgress,
  });

  Future<IHttpResponse<T>> put<T>(
    String path, {
    dynamic data,
    Map<String, dynamic>? queryParameters,
    Map<String, String>? headers,
    ProgressCallback? onSendProgress,
    ProgressCallback? onReceiveProgress,
  });

  Future<IHttpResponse<T>> delete<T>(
    String path, {
    dynamic data,
    Map<String, dynamic>? queryParameters,
    Map<String, String>? headers,
  });

  Future<IHttpResponse<T>> download<T>(
    String url, {
    ProgressCallback? onReceiveProgress,
  });

  Future<IHttpResponse<T>> upload<T>(
    String path, {
    required IFormData formData,
    Map<String, String>? headers,
    ProgressCallback? onSendProgress,
  });
}
