From 4710928407236a57c33ce47637f31dae7eefdbd2 Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Thu, 8 Aug 2024 12:21:04 +0530 Subject: [PATCH] fix(#2767): addressing review comments --- .../bruno-app/src/components/ResponsePane/Timeline/index.js | 3 ++- packages/bruno-js/src/bruno-request.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/bruno-app/src/components/ResponsePane/Timeline/index.js b/packages/bruno-app/src/components/ResponsePane/Timeline/index.js index 326d96fe4..97745f060 100644 --- a/packages/bruno-app/src/components/ResponsePane/Timeline/index.js +++ b/packages/bruno-app/src/components/ResponsePane/Timeline/index.js @@ -33,7 +33,8 @@ const Timeline = ({ request, response }) => { {request.data ? (
-            {'>'} data 
{request.data}
+ {'>'} data{' '} +
{request.data}
) : null} diff --git a/packages/bruno-js/src/bruno-request.js b/packages/bruno-js/src/bruno-request.js index 372a45f76..6fabf50b4 100644 --- a/packages/bruno-js/src/bruno-request.js +++ b/packages/bruno-js/src/bruno-request.js @@ -25,7 +25,7 @@ class BrunoRequest { * It must be noted that the request data is always a string and is what gets sent over the network * If the user wants to access the raw data, they can use getBody({raw: true}) method */ - const isJson = hasJSONContentType(this.req.headers); + const isJson = this.hasJSONContentType(this.req.headers); if (isJson) { this.body = this.__safeParseJSON(req.data); } @@ -99,7 +99,7 @@ class BrunoRequest { return this.req.data; } - const isJson = hasJSONContentType(this.req.headers); + const isJson = this.hasJSONContentType(this.req.headers); if (isJson) { return this.__safeParseJSON(this.req.data); } @@ -124,7 +124,7 @@ class BrunoRequest { return; } - const isJson = hasJSONContentType(this.req.headers); + const isJson = this.hasJSONContentType(this.req.headers); if (isJson && this.__isObject(data)) { this.body = data; this.req.data = this.__safeStringifyJSON(data);