mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-24 17:03:47 +01:00
fix: interpolate json body for type object -- graphql variables (#3212)
This commit is contained in:
parent
d448599a53
commit
e2baed6724
@ -68,6 +68,12 @@ const interpolateVars = (request, envVariables = {}, runtimeVariables = {}, proc
|
||||
if (request.data.length) {
|
||||
request.data = _interpolate(request.data);
|
||||
}
|
||||
} else if (typeof request.data === 'object') {
|
||||
try {
|
||||
let parsed = JSON.stringify(request.data);
|
||||
parsed = _interpolate(parsed);
|
||||
request.data = JSON.parse(parsed);
|
||||
} catch (err) {}
|
||||
}
|
||||
} else if (contentType === 'application/x-www-form-urlencoded') {
|
||||
if (typeof request.data === 'object') {
|
||||
|
Loading…
Reference in New Issue
Block a user