mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-26 14:15:52 +00:00
handle options in getBody for QuickJS VM (#4614)
This commit is contained in:
@@ -87,9 +87,10 @@ const addBrunoRequestShimToContext = (vm, req) => {
|
||||
vm.setProp(reqObject, 'setHeader', setHeader);
|
||||
setHeader.dispose();
|
||||
|
||||
let getBody = vm.newFunction('getBody', function () {
|
||||
return marshallToVm(req.getBody(), vm);
|
||||
let getBody = vm.newFunction('getBody', function (options) {
|
||||
return marshallToVm(req.getBody(vm.dump(options)), vm);
|
||||
});
|
||||
|
||||
vm.setProp(reqObject, 'getBody', getBody);
|
||||
getBody.dispose();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user