Merge pull request #5765 from usebruno/chore/better-message-for-the-future-maintainer

chore(#1693): better comment explaining why bruno sets content-type header as false
This commit is contained in:
Anoop M D
2025-10-12 15:19:37 +05:30
committed by GitHub

View File

@@ -128,7 +128,10 @@ function makeAxiosInstance({
});
Object.entries(config.headers).forEach(([key, value]) => {
// Skip Bruno's internal content-type: false for no body requests
// See https://github.com/usebruno/bruno/issues/1693
// Axios adds 'Content-Type': 'application/x-www-form-urlencoded for requests with no body
// Bruno sets content-type: false for no body requests so that axios doesn't add the default content-type header
// Hence we skip content-type if it's false
if (key.toLowerCase() === 'content-type' && value === false) {
return;
}