1

I have the following code:

@app.route('/webhook', methods=['POST'])
def webhook():
    res = requests.post(POSTBACK_URL, data=json_string)

    print("Result:")
    print(res.text)

if __name__ == '__main__':
    port = int(os.getenv('PORT', 5000))
    app.run(debug=True, port=port, host='0.0.0.0')

I need to verify that the request has not yet finished in 3 seconds and return a message. If the request did not finish returning a message and wait until finalized.

I do not want to check the timeout.

yergo
  • 4,761
  • 2
  • 19
  • 41
  • So, just to be clear: what you want is to be able to assess if the request is finished after 3 seconds. You wish to report on the request status if it is finished or continuing without interrupting the request or waiting for a request timeout. – Vorsprung Sep 28 '17 at 08:14

0 Answers0