import {HttpClient} from '@angular/common/http';
import {Platform} from '@ionic/angular';
import {CapacitorRequestor} from '../capacitor-requestor';
import {NgHttpService} from '../ng-http.service';

export const httpFactory = (platform: Platform, httpClient: HttpClient) => {
  return platform.is('capacitor')
    ? new CapacitorRequestor()
    : new NgHttpService(httpClient);
};
