fix: fixed bug where content type was getting overwritten everytime as application/x-www-form-urlencoded

This commit is contained in:
Anoop M D 2023-05-02 15:25:07 +05:30
parent 2976842588
commit 330a7ad18a
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ const runSingleRequest = async function (filename, bruJson, collectionPath, coll
interpolateVars(request, envVariables, collectionVariables); interpolateVars(request, envVariables, collectionVariables);
// stringify the request url encoded params // stringify the request url encoded params
if(request.headers['content-type'] = 'application/x-www-form-urlencoded') { if(request.headers['content-type'] === 'application/x-www-form-urlencoded') {
request.data = qs.stringify(request.data); request.data = qs.stringify(request.data);
} }

View File

@ -126,7 +126,7 @@ const registerNetworkIpc = (mainWindow, watcher, lastOpenedCollections) => {
interpolateVars(request, envVars, collectionVariables); interpolateVars(request, envVars, collectionVariables);
// stringify the request url encoded params // stringify the request url encoded params
if(request.headers['content-type'] = 'application/x-www-form-urlencoded') { if(request.headers['content-type'] === 'application/x-www-form-urlencoded') {
request.data = qs.stringify(request.data); request.data = qs.stringify(request.data);
} }