mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 15:33:11 +01:00
parent
40fad99803
commit
3ef7df57e2
@ -48,6 +48,12 @@ const addBrunoResponseShimToContext = (vm, res) => {
|
||||
vm.setProp(resObject, 'getResponseTime', getResponseTime);
|
||||
getResponseTime.dispose();
|
||||
|
||||
let setBody = vm.newFunction('setBody', function (data) {
|
||||
res.setBody(vm.dump(data));
|
||||
});
|
||||
vm.setProp(resObject, 'setBody', setBody);
|
||||
setBody.dispose();
|
||||
|
||||
vm.setProp(vm.global, 'res', resObject);
|
||||
resObject.dispose();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user