diff --git a/services/servicesUtils/customOptions.class.ts b/services/servicesUtils/customOptions.class.ts index 8286a1e5..d4e13e03 100644 --- a/services/servicesUtils/customOptions.class.ts +++ b/services/servicesUtils/customOptions.class.ts @@ -2,18 +2,21 @@ import { RequestOptions, Headers} from '@angular/http'; import { COOKIE } from '../../login/utils/helper.class'; -export class CustomOptions{ - public static getAuthOptionsWithBody():RequestOptions{ - let headers = new Headers(); - headers.append('Content-Type', 'application/json'); - headers.append('X-XSRF-TOKEN', COOKIE.getCookie(COOKIE.cookieName_id)); - let options = new RequestOptions({ headers: headers, withCredentials:true }); +export class CustomOptions { + + public static getAuthOptionsWithBody(): RequestOptions { + const headers = new Headers(); + headers.append('Content-Type', 'application/json'); + headers.append('X-XSRF-TOKEN', COOKIE.getCookie(COOKIE.cookieName_id)); + const options = new RequestOptions({ headers: headers, withCredentials: true }); return options; } - public static getAuthOptions():RequestOptions{ - let headers = new Headers(); - headers.append('X-XSRF-TOKEN', COOKIE.getCookie(COOKIE.cookieName_id)); - let options = new RequestOptions({ headers: headers, withCredentials:true }); + + public static getAuthOptions(): RequestOptions { + const headers = new Headers(); + headers.append('X-XSRF-TOKEN', COOKIE.getCookie(COOKIE.cookieName_id)); + const options = new RequestOptions({ headers: headers, withCredentials: true }); return options; } + }