From df2e18bedd5e84ed288cf922ec2399e324edaf2d Mon Sep 17 00:00:00 2001 From: lohit Date: Thu, 8 Aug 2024 19:07:12 +0530 Subject: [PATCH] bru disableParsingResponseJson function rename (#2785) * disable response json parse flag * fix: pr review comments * update bru req function name --- packages/bruno-app/src/components/CodeEditor/index.js | 3 ++- packages/bruno-js/src/bruno-request.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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; } }