@@ -34,12 +34,12 @@ def incomingSms():
3434 to = request .json ['from' ]
3535 message_request = freeclimb .MessageRequest (_from = _from , text = message , to = to )
3636 api_instance .send_an_sms_message (message_request )
37- return jsonify ({'success' :True }), 200 , { 'ContentType' : 'application/json' }
37+ return jsonify ({'success' :True })
3838
3939# Specify this route with 'STATUS CALLBACK URL' in App Config
4040@app .route ('/status' , methods = ['POST' ])
4141def status ():
42- return jsonify ({'success' :True }), 200 , { 'ContentType' : 'application/json' }
42+ return jsonify ({'success' :True })
4343
4444
4545def quickstart_tutorial ():
@@ -54,6 +54,15 @@ def quickstart_tutorial():
5454 print ("\t 2. In the Dashboard or API, set your FreeClimb Application Voice Url to the dynamic endpoint NGROK generated.\n " )
5555 print (api_server )
5656
57+ # Liveness probe endpoint
58+ @app .route ('/live' , methods = ['GET' ])
59+ def live ():
60+ return jsonify ({'status' : 'live' })
61+
62+ # Readiness probe endpoint
63+ @app .route ('/ready' , methods = ['GET' ])
64+ def ready ():
65+ return jsonify ({'status' : 'ready' })
5766
5867if __name__ == '__main__' :
5968 quickstart_tutorial ()
0 commit comments