|
|
@@ -33,9 +33,11 @@ bridge.addHandlers({
|
|
|
'fileName',
|
|
|
]);
|
|
|
msg.url = getFullUrl(msg.url);
|
|
|
- if (msg.data[1]) {
|
|
|
+ let { data } = msg;
|
|
|
+ if (data[1]) {
|
|
|
// TODO: support huge data by splitting it to multiple messages
|
|
|
- msg.data = await encodeBody(msg.data[0], msg.data[1]);
|
|
|
+ data = await encodeBody(data[0], data[1]);
|
|
|
+ msg.data = cloneInto ? cloneInto(data, msg) : data;
|
|
|
}
|
|
|
return sendCmd('HttpRequest', msg);
|
|
|
},
|