Reputation: 177
How to pass the value of variable (Vars) in body section of http requester in Mule 4?
For example : I want to construct a string like below in the body of http requester
{"Script":"Select ID from Student where StudenName = 'tom'"}
The student name in where condition should be a variable. I tried below but the value of vars.name is not getting replaced during runtime .
Upvotes: 0
Views: 133
Reputation: 453
You've got it inside quotes. This should work
#[{"Script":"Select ID from Student where StudentName = '" ++ vars.name ++ "'"}]
Upvotes: 1