|
Lines 82-88
class HttpClient {
Link Here
|
| 82 |
? params.body |
82 |
? params.body |
| 83 |
: JSON.stringify(params.body) |
83 |
: JSON.stringify(params.body) |
| 84 |
: undefined; |
84 |
: undefined; |
| 85 |
let csrf_token = { csrf_token: this.csrf_token }; |
85 |
let csrf_token = { 'CSRF-TOKEN': this.csrf_token }; |
| 86 |
let headers = { ...csrf_token, ...params.headers }; |
86 |
let headers = { ...csrf_token, ...params.headers }; |
| 87 |
return this._fetchJSON( |
87 |
return this._fetchJSON( |
| 88 |
params.endpoint, |
88 |
params.endpoint, |
|
Lines 103-109
class HttpClient {
Link Here
|
| 103 |
? params.body |
103 |
? params.body |
| 104 |
: JSON.stringify(params.body) |
104 |
: JSON.stringify(params.body) |
| 105 |
: undefined; |
105 |
: undefined; |
| 106 |
let csrf_token = { csrf_token: this.csrf_token }; |
106 |
let csrf_token = { 'CSRF-TOKEN': this.csrf_token }; |
| 107 |
let headers = { ...csrf_token, ...params.headers }; |
107 |
let headers = { ...csrf_token, ...params.headers }; |
| 108 |
return this._fetchJSON( |
108 |
return this._fetchJSON( |
| 109 |
params.endpoint, |
109 |
params.endpoint, |
|
Lines 119-125
class HttpClient {
Link Here
|
| 119 |
} |
119 |
} |
| 120 |
|
120 |
|
| 121 |
delete(params = {}) { |
121 |
delete(params = {}) { |
| 122 |
let csrf_token = { csrf_token: this.csrf_token }; |
122 |
let csrf_token = { 'CSRF-TOKEN': this.csrf_token }; |
| 123 |
let headers = { ...csrf_token, ...params.headers }; |
123 |
let headers = { ...csrf_token, ...params.headers }; |
| 124 |
return this._fetchJSON( |
124 |
return this._fetchJSON( |
| 125 |
params.endpoint, |
125 |
params.endpoint, |