Skip to content

Commit

Permalink
Merge pull request #2 from usebruno/main
Browse files Browse the repository at this point in the history
fix: plain text curl data (usebruno#3677)
  • Loading branch information
hadoan authored Dec 26, 2024
2 parents 5a6b5a1 + f8711a9 commit 47cd293
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 47cd293

Please sign in to comment.