super();
}
- list(facts: string): Observable<object[]> {
- return this.http.get<object[]>(this.baseURL, {
- headers: { Accept: this.getVersionHeaderValue(1, 2) },
- params: { facts: facts }
- });
+ list(params: any, facts: string): Observable<object[]> {
+ params = params.set('facts', facts);
+ return this.http
+ .get<object[]>(this.baseURL, {
+ headers: { Accept: this.getVersionHeaderValue(1, 2) },
+ params: params,
+ observe: 'response'
+ })
+ .pipe(
+ map((response: any) => {
+ return response['body'].map((host: any) => {
+ host['headers'] = response.headers;
+ return host;
+ });
+ })
+ );
}
create(hostname: string, addr: string, labels: string[], status: string) {