title: Flask restful - Can't see output from json post
body: <p>I'm using flask to create api server, which get post of json data.
  I used following <a href="https://techtutorialsx.com/2017/01/07/flask-parsing-json-data/" rel="nofollow noreferrer">this</a> tutorial to create the code:
  from flask import Flask
  from flask import request</p>
  
  <pre><code>app = Flask(__name__)
  
  @app.route('/postjson', methods = ['POST'])
  def postJsonHandler():
      print (request.is_json)
      content = request.get_json()
      print (content)
      return 'JSON posted'
  
  app.run(host='0.0.0.0')
  </code></pre>
  
  <p>When I run:</p>
  
  <pre><code>curl -X POST http://127.0.0.1:5000/postjson -H "Content-type: application/json" -d '{ "data": { "url": "https://google.com" }}'
  </code></pre>
  
  <p>I just see <code>"JSON posted"</code>, without any print. Why can't I see any data?
  I also tried to use POSTMAN, but same result.</p>
  
  <p>I also tried the json in the example of the guide:</p>
  
  <pre><code>{ 
   &amp;quot;device&amp;quot;:&amp;quot;TemperatureSensor&amp;quot;, 
   &amp;quot;value&amp;quot;:&amp;quot;20&amp;quot;, 
   &amp;quot;timestamp&amp;quot;:&amp;quot;25/01/2017 10:10:05&amp;quot; 
  }
  </code></pre>
  
  <p>also the same.</p>
  
  <p>EDIT- as @TomMP answer, when I tried the following code:</p>
  
  <pre><code>from flask import Flask
  from flask import request
  
  app = Flask(__name__)
  
  @app.route('/producer', methods = ['POST'])
  def postJsonHandler():
      print (request.is_json)
      content = request.get_json()
      print (content)
      return request.get_json()
      #return 'JSON posted'
  
  app.run(host='0.0.0.0')
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"&gt;
  &lt;title&gt;500 Internal Server Error&lt;/title&gt;
  &lt;h1&gt;Internal Server Error&lt;/h1&gt;
  &lt;p&gt;The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.&lt;/p&gt;
  </code></pre>
  
  <p>And When I try the debug mode, I get:</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;TypeError: 'dict' object is not callable
  The view function did not return a valid response. The return type must be a string, tuple, Response instance, or WSGI callable, but it was a dict. // Werkzeug Debugger&lt;/title&gt;
      &lt;link rel="stylesheet" href="?__debugger__=yes&amp;amp;cmd=resource&amp;amp;f=style.css"
          type="text/css"&gt;
  ... (more lines of data)
  </code></pre>