Skip to content

Commit f8711a9

Browse files
authored
fix: plain text curl data (#3677)
1 parent f871bc0 commit f8711a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/bruno-app/src/utils/curl/curl-to-json.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function getDataString(request) {
5757
console.error('Failed to parse JSON data:', error);
5858
return { data: request.data.toString() };
5959
}
60-
} else if (contentType && contentType.includes('application/xml')) {
60+
} else if (contentType && (contentType.includes('application/xml') || contentType.includes('text/plain'))) {
6161
return { data: request.data };
6262
}
6363

@@ -174,14 +174,14 @@ const curlToJson = (curlCommand) => {
174174
}
175175

176176
if (request.auth) {
177-
if(request.auth.mode === 'basic'){
177+
if (request.auth.mode === 'basic') {
178178
requestJson.auth = {
179179
mode: 'basic',
180180
basic: {
181181
username: repr(request.auth.basic?.username),
182182
password: repr(request.auth.basic?.password)
183183
}
184-
}
184+
};
185185
}
186186
}
187187

0 commit comments

Comments
 (0)