mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-15 11:51:30 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user