title: Flask API failing to decode JSON data. Error: "message": "Failed to decode JSON object: Expecting value: line 1 column 1 (char 0)"
body: <p>I'm setting up a simple rest api using flask and flask-restful. Right now all I'm trying to do is create a post request with some Json data, and then return it just to see if it works. I always get the same error <code>"message": "Failed to decode JSON object: Expecting value: line 1 column 1 (char 0)"</code></p>
  
  <p>Below is my code</p>
  
  <pre><code>from flask import Flask, jsonify, request
  from flask_restful import Resource, Api
  
  app = Flask(__name__)
  api = Api(app)
  
  
  class Tester(Resource):
     def get(self):
         return {'about': 'Hello World'}
  
     def post(self):
         data_json = request.get_json(force=True)
         return {'you sent': data_json}
  
  
  api.add_resource(Tester, '/')
  
  if __name__ == '__main__':
      app.run(debug=True)
  </code></pre>
  
  <p>The curl request I am making to test this is below, I've also tried making request using postman</p>
  
  <pre><code>curl -H "Content-Type: application/json" -X POST -d '{'username':"abc",'password':"abc"}' http://localhost:5000
  </code></pre>