|
@@ -82,11 +82,16 @@
|
82
|
82
|
url: url,
|
83
|
83
|
method: method,
|
84
|
84
|
params: dataGet,
|
85
|
|
- data: JSON.stringify(dataPost),
|
86
|
|
- headers: {
|
87
|
|
- 'Content-Type': "application/json"
|
88
|
|
- }
|
|
85
|
+ headers: {}
|
89
|
86
|
};
|
|
87
|
+ if (dataPost != null && dataPost.constructor === FormData) {
|
|
88
|
+ params.data = dataPost;
|
|
89
|
+ params.headers['Content-Type'] = undefined;
|
|
90
|
+ }
|
|
91
|
+ else {
|
|
92
|
+ params.data = JSON.stringify(dataPost);
|
|
93
|
+ params.headers['Content-Type'] = 'application/json';
|
|
94
|
+ }
|
90
|
95
|
|
91
|
96
|
for (var i = 0; i < luRequest.hooks.before.length; ++i) {
|
92
|
97
|
luRequest.hooks.before[i](url, method, dataGet, dataPost, luBusyGroups);
|