import { HttpClient } from '@angular/common/http' ; import { Injectable } from '@angular/core' ; import { Observable } from 'rxjs' ; @ Injectable ( { providedIn : 'root' } ) export class HttpWrapperService { constructor ( private http ) { } get < T > ( url ) { return this . http . get < T > ( url ) ; } post < T > ( url , body ) { return this . http . post < T > ( url , body ) ; } put < T > ( url , body ) { return this . http . put < T > ( url , body ) ; } delete < T > ( url ) { return this . http . delete < T > ( url ) ; } patch < T > ( url , body ) { return this . http . patch < T > ( url , body ) ; } }