import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { ResourceType,Protocol } from './model/controller.model';
import { Observable, Observer } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class ISCommonService {

  constructor(public client:HttpClient) { }


  loadResourceTypes():Observable<ResourceType[]> {
    return this.client.get<ResourceType[]>("/ajax/resourceTypes");
  }

  loadInfo():Observable<any[]> {
    return this.client.get<any[]>("/ajax/info/");
  }

  loadProtocols():Observable<Protocol[]> {
    return this.client.get<any[]>("/ajax/protocols/");
  }

}
