Fix http_request not allowing bodys (#352)

This commit is contained in:
Beebles
2023-01-22 15:33:26 -07:00
committed by GitHub
parent 3ebaac6752
commit f9755faf9e
+1
View File
@@ -335,6 +335,7 @@ class PluginLoader extends Logger {
fetchNoCors(url: string, request: any = {}) { fetchNoCors(url: string, request: any = {}) {
let args = { method: 'POST', headers: {} }; let args = { method: 'POST', headers: {} };
const req = { ...args, ...request, url, data: request.body }; const req = { ...args, ...request, url, data: request.body };
req?.body && delete req.body
return this.callServerMethod('http_request', req); return this.callServerMethod('http_request', req);
}, },
executeInTab(tab: string, runAsync: boolean, code: string) { executeInTab(tab: string, runAsync: boolean, code: string) {