title: How do you access an Amazon SNS post body with Express / Node.js
body: <p>I'm in the process of rebuilding a PHP app in Node.js on top of the <a href="http://expressjs.com/">Express</a> framework.</p>
  
  <p>One part of the application is a callback url that an <a href="http://aws.amazon.com/sns/">Amazon SNS notification</a> is posted to.</p>
  
  <p>The POST body from SNS is currently read in the following way in PHP (which works):</p>
  
  <pre><code>$notification = json_decode(file_get_contents('php://input'));
  </code></pre>
  
  <p>In Express I have tried the following:</p>
  
  <pre><code>app.post('/notification/url', function(req, res) {
      console.log(req.body);
  });
  </code></pre>
  
  <p>However, watching the console, this only logs the following when the post is made:</p>
  
  <pre><code>{}
  </code></pre>
  
  <p>So, to repeat the question: How do you access an Amazon SNS post body with Express / Node.js</p>