fix/path param (#2388)

* fix(#484): minor code fixes

* code fixes

* fixes for generateCode

* var change

* pr review fixes
This commit is contained in:
lohit
2024-05-30 23:09:34 +05:30
committed by GitHub
parent abfd14a306
commit 470d162fb6
10 changed files with 88 additions and 90 deletions

View File

@@ -99,7 +99,7 @@ const interpolateVars = (request, envVars = {}, collectionVariables = {}, proces
throw { message: 'Invalid URL format', originalError: e.message };
}
const urlPaths = url.pathname
const interpolatedUrlPath = url.pathname
.split('/')
.filter((path) => path !== '')
.map((path) => {
@@ -113,7 +113,7 @@ const interpolateVars = (request, envVars = {}, collectionVariables = {}, proces
})
.join('');
request.url = url.origin + urlPaths + url.search;
request.url = url.origin + interpolatedUrlPath + url.search;
}
if (request.proxy) {

View File

@@ -29,8 +29,7 @@ const prepareRequest = (request, collectionRoot) => {
let axiosRequest = {
method: request.method,
url: request.url,
headers: headers,
paths: request.paths
headers: headers
};
const collectionAuth = get(collectionRoot, 'request.auth');