Lines 86-92
class HttpClient {
Link Here
|
86 |
? params.body |
86 |
? params.body |
87 |
: JSON.stringify(params.body) |
87 |
: JSON.stringify(params.body) |
88 |
: undefined; |
88 |
: undefined; |
89 |
let csrf_token = { csrf_token: this.csrf_token }; |
89 |
let csrf_token = { "CSRF-TOKEN": this.csrf_token }; |
90 |
let headers = { ...csrf_token, ...params.headers }; |
90 |
let headers = { ...csrf_token, ...params.headers }; |
91 |
return this._fetchJSON( |
91 |
return this._fetchJSON( |
92 |
params.endpoint, |
92 |
params.endpoint, |
Lines 107-113
class HttpClient {
Link Here
|
107 |
? params.body |
107 |
? params.body |
108 |
: JSON.stringify(params.body) |
108 |
: JSON.stringify(params.body) |
109 |
: undefined; |
109 |
: undefined; |
110 |
let csrf_token = { csrf_token: this.csrf_token }; |
110 |
let csrf_token = { "CSRF-TOKEN": this.csrf_token }; |
111 |
let headers = { ...csrf_token, ...params.headers }; |
111 |
let headers = { ...csrf_token, ...params.headers }; |
112 |
return this._fetchJSON( |
112 |
return this._fetchJSON( |
113 |
params.endpoint, |
113 |
params.endpoint, |
Lines 123-129
class HttpClient {
Link Here
|
123 |
} |
123 |
} |
124 |
|
124 |
|
125 |
delete(params = {}) { |
125 |
delete(params = {}) { |
126 |
let csrf_token = { csrf_token: this.csrf_token }; |
126 |
let csrf_token = { "CSRF-TOKEN": this.csrf_token }; |
127 |
let headers = { ...csrf_token, ...params.headers }; |
127 |
let headers = { ...csrf_token, ...params.headers }; |
128 |
return this._fetchJSON( |
128 |
return this._fetchJSON( |
129 |
params.endpoint, |
129 |
params.endpoint, |