Skip to content

Commit

Permalink
chore: disableParsingResponseJson shim fn in safe mode (usebruno#3110)
Browse files Browse the repository at this point in the history
  • Loading branch information
lohxt1 authored Sep 16, 2024
1 parent 4f7cefe commit 3cb3f80
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/bruno-js/src/sandbox/quickjs/shims/bruno-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ const addBrunoRequestShimToContext = (vm, req) => {
vm.setProp(reqObject, 'setTimeout', setTimeout);
setTimeout.dispose();

let disableParsingResponseJson = vm.newFunction('disableParsingResponseJson', function () {
req.disableParsingResponseJson();
});
vm.setProp(reqObject, 'disableParsingResponseJson', disableParsingResponseJson);
disableParsingResponseJson.dispose();

vm.setProp(vm.global, 'req', reqObject);
reqObject.dispose();
};
Expand Down

0 comments on commit 3cb3f80

Please sign in to comment.