title: POST curl returns bad request 400 (flask,RESTful)
body: <p>I have a problem posting JSON via curl.
  I began to study the development of a web recently. I read guides from Miguel Grinberg, look up over all possible resources. I want to POST into json new field. 
  If any parameter is missing in the request, then 400.</p>
  
  <pre><code>from flask import Flask, request
  from flask_restful import reqparse, abort, Api, Resource
  import json
  app = Flask(__name__)
  api = Api(app)
  
  DATA = {
      'id': 1111,
      'Label': {'0.5': 'letter'},
  }
  
  def abort_if_no_data(key):
      if key not in DATA:
          abort(404)
  
  class Data(Resource):
      def __init__(self):
          self.reqparse = reqparse.RequestParser()
  
      def get(self, key):
          abort_if_no_data(key)
          return DATA[key]
  
      def delete(self, key):
          del DATA[key]
          return '', 200
  
      def put(self, key):
          abort_if_no_data(key)
          args = self.reqparse.parse_args()
          for key, value in args.items():
              DATA[key] = value
  
              return args, 200
  
  
  class DataList(Resource):
  
      def __init__(self):
          self.reqparse = reqparse.RequestParser()
  
      def post(self):
          args = self.reqparse.parse_args()
          if args is not request.json:
              abort(400)
          for key, value in args.items():
              DATA[0] = {key: value}
              return DATA[key], 201
  
  api.add_resource(DataList, '/test')
  api.add_resource(Data, '/test/&lt;key&gt;')
  </code></pre>
  
  <p>So when I'm trying curl it with</p>
  
  <pre><code>curl -X POST --data '{"value": 41}' http://localhost:5000/test
  </code></pre>
  
  <p>Server answers with Bad Request 400</p>
  
  <pre><code>{
      "message": "Bad Request", 
      "status": 400
  }
  * Closing connection 0
  </code></pre>
  
  <p>I want to add a new field but I can't. What am I doing wrong and what I should do?</p>