diff --git a/packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js b/packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js index 111f26d3e..e6fd77ffd 100644 --- a/packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js +++ b/packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js @@ -45,6 +45,8 @@ import { import { closeAllCollectionTabs } from 'providers/ReduxStore/slices/tabs'; import { resolveRequestFilename } from 'utils/common/platform'; +import { parseQueryParams, splitOnFirst } from 'utils/url/index'; +import { each } from 'lodash'; const PATH_SEPARATOR = path.sep; @@ -588,6 +590,12 @@ export const newHttpRequest = (params) => (dispatch, getState) => { return reject(new Error('Collection not found')); } + const parts = splitOnFirst(requestUrl, '?'); + const params = parseQueryParams(parts[1]); + each(params, (urlParam) => { + urlParam.enabled = true; + }); + const collectionCopy = cloneDeep(collection); const item = { uid: uuid(), @@ -597,6 +605,7 @@ export const newHttpRequest = (params) => (dispatch, getState) => { method: requestMethod, url: requestUrl, headers: [], + params, body: { mode: 'none', json: null, diff --git a/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js b/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js index e31b53355..8d11d38c1 100644 --- a/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js +++ b/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js @@ -286,6 +286,12 @@ export const collectionsSlice = createSlice({ const collection = findCollectionByUid(state.collections, action.payload.collectionUid); if (collection && collection.items && collection.items.length) { + const parts = splitOnFirst(action.payload.requestUrl, '?'); + const params = parseQueryParams(parts[1]); + each(params, (urlParam) => { + urlParam.enabled = true; + }); + const item = { uid: action.payload.uid, name: action.payload.requestName, @@ -293,7 +299,7 @@ export const collectionsSlice = createSlice({ request: { url: action.payload.requestUrl, method: action.payload.requestMethod, - params: [], + params, headers: [], body: { mode: null,