From 5155ac1ed26f17373f72daa2fe5e70b219547989 Mon Sep 17 00:00:00 2001 From: Pooja Belaramani Date: Wed, 18 Dec 2024 16:20:44 +0530 Subject: [PATCH] fix: plain text curl data --- packages/bruno-app/src/utils/curl/curl-to-json.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/bruno-app/src/utils/curl/curl-to-json.js b/packages/bruno-app/src/utils/curl/curl-to-json.js index 48c33bb0a..c1398ab14 100644 --- a/packages/bruno-app/src/utils/curl/curl-to-json.js +++ b/packages/bruno-app/src/utils/curl/curl-to-json.js @@ -57,7 +57,7 @@ function getDataString(request) { console.error('Failed to parse JSON data:', error); return { data: request.data.toString() }; } - } else if (contentType && contentType.includes('application/xml')) { + } else if (contentType && (contentType.includes('application/xml') || contentType.includes('text/plain'))) { return { data: request.data }; } @@ -174,14 +174,14 @@ const curlToJson = (curlCommand) => { } if (request.auth) { - if(request.auth.mode === 'basic'){ + if (request.auth.mode === 'basic') { requestJson.auth = { mode: 'basic', basic: { username: repr(request.auth.basic?.username), password: repr(request.auth.basic?.password) } - } + }; } }