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) } - } + }; } }