Open yqleng1987 opened 6 years ago
Is that possible to add a new part to define global variables in a json file? For example:
[
{
"variables" :
{
"v1" : "Mike",
"v2" : RANDOM
},
"request" :
{
"method" : "get",
"uri" : "/test"
},
"response" :
{
"text" : "${v1}"
},
"on" :
{
"complete" :
{
"async" : "true",
"latency" : 1000,
"post" :
{
"url" : "http://another_site",
"content" : "${v2}"
}
}
}
}
]
I'm working on random template function.
You suggestion is really good. I'll try to figure out a solution to separate variables.
Is this problem solved now?
I want to define a global variable which could be used anywhere (request/response/event/...) in the json file and its value is random.