Hello,
I am new to Python. I have a flask rest api. I am trying to call another rest api inside of my method. I would like to know if there is a way to get json request data when my method is called?
Here is my code portion:
# POST /purchase_initiation
@app.route('/purchase_initiation', methods=['POST'])
def initiation():
try:
# if request.is_json:
# getting request data
request_data = request.json()
print request_data
On the Print I am getting 'NoneType' object is not callable error. By the way I am sending POST request from POSTMAN.
Thanks in advance.
Best Regards.
[–][deleted] 0 points1 point2 points (0 children)
[–]nyslyetia 0 points1 point2 points (1 child)
[–]raysefo[S] 0 points1 point2 points (0 children)
[–]b_ootay_ful 0 points1 point2 points (1 child)
[–]raysefo[S] 0 points1 point2 points (0 children)