luci-base: luci.js: support passing FormData as request payload

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-09-03 16:48:31 +02:00
parent d5e6688072
commit 8481330e42

View file

@ -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: