[Trunk|Library]: CustomOptions.class.ts: clear code
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@55005 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
10051a303e
commit
ea267d003b
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue