I'm using Sinatra and rest-client to send a JSON payload through and process it (the requests require keypair signatures).
However it looks like rest-client is sending escaped JSON through.
My RestClient log:
RestClient.post uriHere, "{\"eventID\":1}", "Accept"=>"application/json", "Accept-Encoding"=>"gzip, deflate", "Authorization"=>"Bearer tokenHere", "Content-Hash"=>"sha1 signatureHere", "Content-Length"=>"xyz", "Content-Type"=>"application/json", "Date"=>"Thu, 29 Jan 2015 22:26:47 GMT"
I can't verify really if the endpoint is reading the escaped characters, but if it's sending them like that, obviously it's not valid JSON. I've tried .gsub but it doesn't remove the extra slashes.
Thoughts?