1 |
55964
|
argiro.kok
|
import {COOKIE} from '../../login/utils/helper.class';
|
2 |
|
|
import {HttpHeaders} from "@angular/common/http";
|
3 |
50169
|
argiro.kok
|
|
4 |
|
|
|
5 |
55005
|
k.triantaf
|
export class CustomOptions {
|
6 |
|
|
|
7 |
55964
|
argiro.kok
|
/*
|
8 |
55005
|
k.triantaf
|
public static getAuthOptionsWithBody(): RequestOptions {
|
9 |
|
|
const headers = new Headers();
|
10 |
|
|
headers.append('Content-Type', 'application/json');
|
11 |
|
|
headers.append('X-XSRF-TOKEN', COOKIE.getCookie(COOKIE.cookieName_id));
|
12 |
|
|
const options = new RequestOptions({ headers: headers, withCredentials: true });
|
13 |
50169
|
argiro.kok
|
return options;
|
14 |
|
|
}
|
15 |
55964
|
argiro.kok
|
*/
|
16 |
55005
|
k.triantaf
|
|
17 |
55964
|
argiro.kok
|
public static getAuthOptionsWithBody():{} {
|
18 |
|
|
return {
|
19 |
|
|
headers: new HttpHeaders({
|
20 |
|
|
'Content-Type': 'application/json',
|
21 |
|
|
'X-XSRF-TOKEN': COOKIE.getCookie(COOKIE.cookieName_id)
|
22 |
|
|
}), withCredentials: true
|
23 |
|
|
};
|
24 |
|
|
}
|
25 |
|
|
|
26 |
|
|
/*
|
27 |
55005
|
k.triantaf
|
public static getAuthOptions(): RequestOptions {
|
28 |
|
|
const headers = new Headers();
|
29 |
|
|
headers.append('X-XSRF-TOKEN', COOKIE.getCookie(COOKIE.cookieName_id));
|
30 |
|
|
const options = new RequestOptions({ headers: headers, withCredentials: true });
|
31 |
50169
|
argiro.kok
|
return options;
|
32 |
|
|
}
|
33 |
55964
|
argiro.kok
|
*/
|
34 |
55005
|
k.triantaf
|
|
35 |
55964
|
argiro.kok
|
public static getAuthOptions():any {
|
36 |
|
|
const httpOptions = {
|
37 |
|
|
headers: new HttpHeaders({
|
38 |
|
|
'X-XSRF-TOKEN': COOKIE.getCookie(COOKIE.cookieName_id),
|
39 |
|
|
}), withCredentials: true
|
40 |
|
|
};
|
41 |
|
|
return httpOptions;
|
42 |
|
|
}
|
43 |
|
|
|
44 |
50169
|
argiro.kok
|
}
|