summaryrefslogtreecommitdiffstats
path: root/cds-ui/client/src/app/common/core/services/api.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cds-ui/client/src/app/common/core/services/api.service.ts')
-rw-r--r--cds-ui/client/src/app/common/core/services/api.service.ts32
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
}