Skip to content

Commit

Permalink
fix: plain text curl data (#3677)
Browse files Browse the repository at this point in the history
  • Loading branch information
pooja-bruno authored Dec 23, 2024
1 parent f871bc0 commit f8711a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/bruno-app/src/utils/curl/curl-to-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}

Expand Down Expand Up @@ -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)
}
}
};
}
}

Expand Down

0 comments on commit f8711a9

Please sign in to comment.