Turns out the requests coming from Amazon SNS have
, even
though they are JSON. One way to handle them in a rails app is this:1
Content-Type: text/plain
amazon_params = JSON.parse(request.raw_post)
Notice that we’re using
, because params won’t have the body parsed.1
raw_post