mirror of
https://github.com/usebruno/bruno.git
synced 2025-08-10 03:19:01 +02:00
feat: request execution mode (#3200)
This commit is contained in:
@ -173,6 +173,10 @@ class BrunoRequest {
|
||||
disableParsingResponseJson() {
|
||||
this.req.__brunoDisableParsingResponseJson = true;
|
||||
}
|
||||
|
||||
getExecutionMode() {
|
||||
return this.req.__bruno__executionMode;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = BrunoRequest;
|
||||
|
@ -111,6 +111,12 @@ const addBrunoRequestShimToContext = (vm, req) => {
|
||||
vm.setProp(reqObject, 'disableParsingResponseJson', disableParsingResponseJson);
|
||||
disableParsingResponseJson.dispose();
|
||||
|
||||
let getExecutionMode = vm.newFunction('getExecutionMode', function () {
|
||||
return marshallToVm(req.getExecutionMode(), vm);
|
||||
});
|
||||
vm.setProp(reqObject, 'getExecutionMode', getExecutionMode);
|
||||
getExecutionMode.dispose();
|
||||
|
||||
vm.setProp(vm.global, 'req', reqObject);
|
||||
reqObject.dispose();
|
||||
};
|
||||
|
Reference in New Issue
Block a user