import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; @Injectable() export class HttpBaseService { constructor(private http: HttpClient) {} get(url: string, params?: { [key: string]: any }): Observable { return this.http.get(url, params); } post(url: string, body: any, params?: { [key: string]: any }): Observable { return this.http.post(url, body, params); } }