mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-09 06:55:03 +00:00
fix(#148) : fixed issue where form url encoded params were not being interpolated
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
const qs = require('qs');
|
||||
const chalk = require('chalk');
|
||||
const { forOwn, each, extend, get } = require('lodash');
|
||||
const FormData = require('form-data');
|
||||
@@ -39,6 +40,11 @@ const runSingleRequest = async function (filename, bruJson, collectionPath, coll
|
||||
// interpolate variables inside request
|
||||
interpolateVars(request, envVariables, collectionVariables);
|
||||
|
||||
// stringify the request url encoded params
|
||||
if(request.headers['content-type'] = 'application/x-www-form-urlencoded') {
|
||||
request.data = qs.stringify(request.data);
|
||||
}
|
||||
|
||||
// run request
|
||||
const response = await axios(request);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user