amazon sns http endpoint post

Developer from somewhere

Turns out the requests coming from Amazon SNS have

1
Content-Type: text/plain
, even though they are JSON. One way to handle them in a rails app is this:

amazon_params = JSON.parse(request.raw_post)

Notice that we’re using

1
raw_post
, because params won’t have the body parsed.