Nov-26-2018, 10:45 AM
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:
Thanks in advance.
Best Regards.
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_dataOn 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.