diff options
author | 2019-04-11 18:34:10 +0530 | |
---|---|---|
committer | 2019-04-11 18:34:21 +0530 | |
commit | 07b70ec6b649020eed49bc4a81cb381a65c3d095 (patch) | |
tree | 82ce92f2fbfafde56714ffd2255948e305bd18fb /cds-ui/client/src/app/common/core | |
parent | 0c0e1d2e6d5e57a99ff8551a2d7b8e9cdab7d860 (diff) |
Enrichment and Download Zip file bug fix
Change-Id: If4219a99bfc7082648a28149652d75a09333bd55
Issue-ID: CCSDK-1212
Signed-off-by: Ezhilarasi <ezhrajam@in.ibm.com>
Diffstat (limited to 'cds-ui/client/src/app/common/core')
-rw-r--r-- | cds-ui/client/src/app/common/core/services/api.service.ts | 32 |
1 files changed, 4 insertions, 28 deletions
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<any> { - - 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<any> { + return this._http.get(url,params); } - downloadCBA(uri: string, params?: any): Observable<Blob> { - // return this._http.get<Blob>(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<Blob>(LoopbackConfig.url + uri, HTTPOptions); - } + post(url: string, body: any | null, options?:any): Observable<any> { - post(uri: string, body: FormData): Observable<any> { - // 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 } |