HulkRepository constructor

HulkRepository({
  1. InterceptorSendCallback? requestInterceptor,
  2. InterceptorSuccessCallback? responseInterceptor,
  3. InterceptorErrorCallback? errorInterceptor,
})

Implementation

HulkRepository({
  InterceptorSendCallback? requestInterceptor,
  InterceptorSuccessCallback? responseInterceptor,
  InterceptorErrorCallback? errorInterceptor,
}) {
  httpClient = Dio();
  httpClient.options.headers[HttpHeaders.contentTypeHeader] =
      'application/json';

  addInterceptors(
    requestInterceptor: requestInterceptor,
    responseInterceptor: responseInterceptor,
    errorInterceptor: errorInterceptor,
  );

  _instances.add(this);
}