curl -s -XPOST http://localhost:12345 --header 'Content-Type: application/json' -d '{"myVar":"myValue"}'
This command executes fine, api returns everything normally.
However, if i do it like that
local instruction="curl -s -XPOST http://localhost:12345 --header 'Content-Type: application/json' -d '{\"myVar\":\"myValue\"}'"
local response=$($instruction)
all the special characters are converted to % string. Meaning, the " character becomes %22.
How to stop this from happening?
instruction is read from another file! NOT THE SAME as the reason why this is closed!