From 47179535d5a46733dc9dec70c948deddbcef2721 Mon Sep 17 00:00:00 2001 From: Pragadesh-45 <54320162+Pragadesh-45@users.noreply.github.com> Date: Sun, 15 Dec 2024 16:40:12 +0530 Subject: [PATCH] fix: update content-type header for XML requests to application/xml (#3648) --- packages/bruno-cli/src/runner/prepare-request.js | 2 +- packages/bruno-electron/src/ipc/network/prepare-request.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bruno-cli/src/runner/prepare-request.js b/packages/bruno-cli/src/runner/prepare-request.js index 1d18d529..de0dbd14 100644 --- a/packages/bruno-cli/src/runner/prepare-request.js +++ b/packages/bruno-cli/src/runner/prepare-request.js @@ -118,7 +118,7 @@ const prepareRequest = (item = {}, collection = {}) => { if (request.body.mode === 'xml') { if (!contentTypeDefined) { - axiosRequest.headers['content-type'] = 'text/xml'; + axiosRequest.headers['content-type'] = 'application/xml'; } axiosRequest.data = request.body.xml; } diff --git a/packages/bruno-electron/src/ipc/network/prepare-request.js b/packages/bruno-electron/src/ipc/network/prepare-request.js index a544c970..f3aea2c8 100644 --- a/packages/bruno-electron/src/ipc/network/prepare-request.js +++ b/packages/bruno-electron/src/ipc/network/prepare-request.js @@ -224,7 +224,7 @@ const prepareRequest = (item, collection) => { if (request.body.mode === 'xml') { if (!contentTypeDefined) { - axiosRequest.headers['content-type'] = 'text/xml'; + axiosRequest.headers['content-type'] = 'application/xml'; } axiosRequest.data = request.body.xml; }