*protomux will automatically encode data to JSON, so just set value default to empty string

This commit is contained in:
Derrick Hammer 2022-11-27 23:59:33 -05:00
parent da4bda03ee
commit 49fc39ab08
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 9 deletions

View File

@ -18,15 +18,7 @@ export default class RPC extends ProtomuxRPC {
super(stream, options);
}
async request(
method: any,
value: Buffer | Uint8Array | string = b4a.from(""),
options = {}
) {
if (!b4a.isBuffer(value)) {
value = b4a.from(value);
}
async request(method: any, value: any | string = "", options = {}) {
return super.request(method, value, options);
}
}