argos/dmp-frontend/src/app/services/external-sources/external-sources-configurat...

29 lines
1.0 KiB
TypeScript
Raw Normal View History

2018-05-28 11:50:42 +02:00
import { ExternalSourcesConfiguration } from "../../models/external-sources/ExternalSourcesConfiguration";
import { BaseHttpService } from "../../utilities/cite-http-service-module/base-http.service";
import { HostConfiguration } from "../../app.constants";
import { HttpHeaders } from "@angular/common/http";
import { Injectable } from "@angular/core";
import { Observable } from "rxjs/Observable";
@Injectable()
export class ExternalSourcesConfigurationService {
private actionUrl: string;
private headers: HttpHeaders;
constructor(private http: BaseHttpService) {
this.actionUrl = HostConfiguration.Server + 'common/';
this.headers = new HttpHeaders();
this.headers = this.headers.set('Content-Type', 'application/json');
this.headers = this.headers.set('Accept', 'application/json');
}
public getExternalSourcesConfiguration(): Observable<ExternalSourcesConfiguration> {
return this.http.get<ExternalSourcesConfiguration>(this.actionUrl + "externalSourcesConfiguration", { headers: this.headers });
}
}