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.