diff --git a/packages/bruno-app/src/components/CodeEditor/index.js b/packages/bruno-app/src/components/CodeEditor/index.js index 85f6c2da4..48ca3e903 100644 --- a/packages/bruno-app/src/components/CodeEditor/index.js +++ b/packages/bruno-app/src/components/CodeEditor/index.js @@ -66,7 +66,8 @@ if (!SERVER_RENDERED) { 'bru.getVar(key)', 'bru.setVar(key,value)', 'bru.deleteVar(key)', - 'bru.setNextRequest(requestName)' + 'bru.setNextRequest(requestName)', + 'req.disableParsingResponseJson()' ]; CodeMirror.registerHelper('hint', 'brunoJS', (editor, options) => { const cursor = editor.getCursor(); diff --git a/packages/bruno-js/src/bruno-request.js b/packages/bruno-js/src/bruno-request.js index 518888484..cf5f59aca 100644 --- a/packages/bruno-js/src/bruno-request.js +++ b/packages/bruno-js/src/bruno-request.js @@ -168,7 +168,8 @@ class BrunoRequest { return obj !== null && typeof obj === 'object'; } - disableResponseJsonParse() { + + disableParsingResponseJson() { this.req.__brunoDisableParsingResponseJson = true; } }