Added slices
Change-Id: I9dfaa9348fa82da844a04c0c2a58ce07e9fa3a28
diff --git a/src/app/services/rest/xoshttp.service.ts b/src/app/services/rest/xoshttp.service.ts
index 5572683..a300ee3 100644
--- a/src/app/services/rest/xoshttp.service.ts
+++ b/src/app/services/rest/xoshttp.service.ts
@@ -13,9 +13,20 @@
) {
}
+ // TODO intercept non authenticated calls and send to login (remove cookies)
+ // TODO add POST, PUT, DELETE declaration
+ get(url: string, options?: RequestOptionsArgs): Observable<Response> {
+
+ options = this.checkOptions(options);
+ options = this.getHeaders(options);
+ options = this.getParams(options);
+
+ return this.http.get(url, options);
+ }
+
private checkOptions(options?: RequestOptionsArgs): RequestOptionsArgs {
// if options are not there, create them
- if(!options){
+ if (!options) {
options = {};
}
return options;
@@ -41,15 +52,4 @@
}
return options;
}
-
- get(url: string, options?: RequestOptionsArgs): Observable<Response> {
-
- options = this.checkOptions(options);
- options = this.getHeaders(options);
- options = this.getParams(options);
-
- return this.http.get(url, options)
- }
-
- // TODO add POST, PUT, DELETE declaration
}