fix: plain text curl data

This commit is contained in:
Pooja Belaramani 2024-12-18 16:20:44 +05:30
parent b9ec0acab4
commit 5155ac1ed2

View File

@ -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 };
}
@ -181,7 +181,7 @@ const curlToJson = (curlCommand) => {
username: repr(request.auth.basic?.username),
password: repr(request.auth.basic?.password)
}
}
};
}
}