luci-base: luci.js: support passing FormData as request payload
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
d5e6688072
commit
8481330e42
1 changed files with 7 additions and 2 deletions
|
@ -360,8 +360,13 @@
|
|||
break;
|
||||
|
||||
case 'object':
|
||||
content = JSON.stringify(opt.content);
|
||||
contenttype = 'application/json';
|
||||
if (!(opt.content instanceof FormData)) {
|
||||
content = JSON.stringify(opt.content);
|
||||
contenttype = 'application/json';
|
||||
}
|
||||
else {
|
||||
content = opt.content;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue