import { Injectable } from '@angular/core'; import { HttpClient, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import {environment} from "@env/environment"; type EntityResponseType = HttpResponse; @Injectable({ providedIn: 'root' }) export class ReferenceManagerService { public resourceUrl = environment.apiUrl; constructor(protected http: HttpClient) {} search(value: string): Observable { return this.http .get(`${this.resourceUrl}/api/zipcodes/search/${value}`, { observe: 'body' }) .pipe(map((res: EntityResponseType) => res)); } }