From 07b70ec6b649020eed49bc4a81cb381a65c3d095 Mon Sep 17 00:00:00 2001 From: Ezhilarasi Date: Thu, 11 Apr 2019 18:34:10 +0530 Subject: Enrichment and Download Zip file bug fix Change-Id: If4219a99bfc7082648a28149652d75a09333bd55 Issue-ID: CCSDK-1212 Signed-off-by: Ezhilarasi --- .../src/app/common/core/services/api.service.ts | 32 +++------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'cds-ui/client/src/app/common') diff --git a/cds-ui/client/src/app/common/core/services/api.service.ts b/cds-ui/client/src/app/common/core/services/api.service.ts index 20d8a9bce..463ef3827 100644 --- a/cds-ui/client/src/app/common/core/services/api.service.ts +++ b/cds-ui/client/src/app/common/core/services/api.service.ts @@ -31,38 +31,14 @@ export class ApiService { constructor(private _http: HttpClient) { } - enrich(uri: string, body: FormData): Observable { - - var HTTPOptions = { - headers: new HttpHeaders({ 'Accept': 'application/zip', }), - observe: "response" as 'body',// to display the full response & as 'body' for type cast - 'responseType': 'blob' as 'json' - } - return this._http.post(LoopbackConfig.url + uri, body, HTTPOptions); - + get(url: string, params?: any): Observable { + return this._http.get(url,params); } - downloadCBA(uri: string, params?: any): Observable { - // return this._http.get(LoopbackConfig.url+uri); - var HTTPOptions = { - headers: new HttpHeaders({ 'Accept': 'application/zip; charset=UTF-8', }), - observe: "response" as 'body',// to display the full response & as 'body' for type cast - 'responseType': 'blob' as 'json' - } - return this._http.get(LoopbackConfig.url + uri, HTTPOptions); - } + post(url: string, body: any | null, options?:any): Observable { - post(uri: string, body: FormData): Observable { - // to do - const httpOptions = { - headers: new HttpHeaders({ - 'Authorization': LoopbackConfig.authtoken, - - }) - }; - return this._http.post(LoopbackConfig.url + uri, body, httpOptions); + return this._http.post(url, body,options); } - put() { // to do } -- cgit 1.2.3-korg