mirror of
https://github.com/usebruno/bruno.git
synced 2024-12-22 14:41:04 +01:00
fix: plain text curl data
This commit is contained in:
parent
b9ec0acab4
commit
5155ac1ed2
@ -57,7 +57,7 @@ function getDataString(request) {
|
|||||||
console.error('Failed to parse JSON data:', error);
|
console.error('Failed to parse JSON data:', error);
|
||||||
return { data: request.data.toString() };
|
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 };
|
return { data: request.data };
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,14 +174,14 @@ const curlToJson = (curlCommand) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (request.auth) {
|
if (request.auth) {
|
||||||
if(request.auth.mode === 'basic'){
|
if (request.auth.mode === 'basic') {
|
||||||
requestJson.auth = {
|
requestJson.auth = {
|
||||||
mode: 'basic',
|
mode: 'basic',
|
||||||
basic: {
|
basic: {
|
||||||
username: repr(request.auth.basic?.username),
|
username: repr(request.auth.basic?.username),
|
||||||
password: repr(request.auth.basic?.password)
|
password: repr(request.auth.basic?.password)
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user