Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Injectable } from '@angular/core';
- import { HttpClient, HttpHeaders } from '@angular/common/http';
- @Injectable({
- providedIn: 'root'
- })
- export class HistorianAPIService {
- access_token = 'eyJhbGciOiJSUzI1NiJ9.eyJqs8V38Q';
- headers = new HttpHeaders({
- 'Authorization': `Bearer ${this.access_token}`,
- 'mode': 'cors'
- });
- private server_url = `http://10.1.1.31:80/historian-rest-api/v1/tags?nameMask=*&maxNumber=100`;
- constructor(private http: HttpClient) { }
- checkHistorianAPI() {
- return this.http.get(this.server_url, { headers: this.headers });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement