Advertisement
Shell_Casing

sss

Dec 21st, 2018
530
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. import { Injectable } from '@angular/core';
  2. import { HttpClient, HttpHeaders } from '@angular/common/http';
  3. import { environment } from '../environments/environment';
  4.  
  5. @Injectable({
  6. providedIn: 'root'
  7. })
  8. export class HistorianAPIService {
  9.  
  10.  
  11. headers = new HttpHeaders({
  12. 'Authorization': `Bearer ${environment.access_token}`,
  13. });
  14.  
  15. private dataUrl = environment.dataUrl;
  16. private dataSource = `assets/data/WIN-9DBOGP80695.Simulation00052 - OG.json`;
  17.  
  18. constructor(private http: HttpClient) { }
  19.  
  20. // getHistorianData() {
  21. // return this.http.get(this.serverUrl, { headers: this.headers });
  22. // }
  23.  
  24. getHistorianData() {
  25. return this.http.get(this.dataSource);
  26. }
  27.  
  28.  
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement