import { Injectable } from '@angular/core' ; import { HttpClient } from '@angular/common/http' ; import { LocalStorageService } from './core/local-storage.service' ; import { Observable } from 'rxjs' ; import { ServiceResult } from '../models/core/service-result' ; import * as qs from 'qs' ; @ Injectable ( { providedIn : 'root' } ) export class WebService { constructor ( private http , private store ) { } private post ( action , param ) { const paramsStr = qs . stringify ( param ) ; return this . http . post < ServiceResult > ( 'api/' + action , paramsStr ) ; } private postJson ( action , param ) { return this . http . post < ServiceResult > ( 'api/' + action , param ) ; } }