I have the following which works in bash:
curl -d "{ \"auth_token\": \"secret\", \"current\":"${COUNT}"}" http://lab:3030/widgets/connections
But if I tried this in Ruby is fails:
`curl -d "{\"auth_token\":\"secret\",\"current\":"#{count}"}" http://lab:3030/widgets/connections`
And get this error message:
JSON::ParserError - 746: unexpected token at '{auth_token:secret,current:4}':
The output of from Ruby appears to look correct on screen but trigger the JSON parser error. What else can I check for?
I was thinking about using a gem like curb-fu but could not figure out how to construct it to look the same as the bash one above.
Thanks.