mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-25 01:14:23 +01:00
parent
40fad99803
commit
3ef7df57e2
@ -48,6 +48,12 @@ const addBrunoResponseShimToContext = (vm, res) => {
|
|||||||
vm.setProp(resObject, 'getResponseTime', getResponseTime);
|
vm.setProp(resObject, 'getResponseTime', getResponseTime);
|
||||||
getResponseTime.dispose();
|
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);
|
vm.setProp(vm.global, 'res', resObject);
|
||||||
resObject.dispose();
|
resObject.dispose();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user