I just created a basic test application with flask:
from flask import Flask, jsonify, request
app = Flask(__name__)
@app.route("/test", methods=["POST", "GET"])
def test():
data = request.get_json()
return str(type(data))
if __name__ == '__main__':
app.run(debug=True)
The return-Value here is always NoneType! Why doesn't the get_json method my Json-String? I am using Postman to call the url with the json-String. Here is a Screenshot of how i did this:
Can anybody tell what i am doing wrong here? Is the information i gave you enough to figure that out or do you need something else?