title: How to get POSTed JSON in Flask?
body: <p>I'm trying to build a simple API using Flask, in which I now want to read some POSTed JSON. I do the POST with the Postman Chrome extension, and the JSON I POST is simply <code>{"text":"lalala"}</code>. I try to read the JSON using the following method:</p>
  
  <pre><code>@app.route('/api/add_message/&lt;uuid&gt;', methods=['GET', 'POST'])
  def add_message(uuid):
      content = request.json
      print content
      return uuid
  </code></pre>
  
  <p>On the browser it correctly returns the UUID I put in the GET, but on the console, it just prints out <code>None</code> (where I expect it to print out the <code>{"text":"lalala"}</code>. Does anybody know how I can get the posted JSON from within the Flask method? </p>