import { Injectable } from '@angular/core'; import { Observable, of } from 'rxjs'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { MessageService } from './message.service'; import { serviceBaseUrl } from './config'; import { TestOutput } from './testOutput'; @Injectable({ providedIn: 'root' }) export class TestOutputService { constructor(private messageService: MessageService, private http: HttpClient) { } async getTestOutput(): Promise { this.messageService.add(`TestOutputService: fetch test output`); return this.http.get(`${serviceBaseUrl}/v1/test`).toPromise() } }