@@ -34,12 +34,12 @@ def incomingSms():
34
34
to = request .json ['from' ]
35
35
message_request = freeclimb .MessageRequest (_from = _from , text = message , to = to )
36
36
api_instance .send_an_sms_message (message_request )
37
- return jsonify ({'success' :True }), 200 , { 'ContentType' : 'application/json' }
37
+ return jsonify ({'success' :True })
38
38
39
39
# Specify this route with 'STATUS CALLBACK URL' in App Config
40
40
@app .route ('/status' , methods = ['POST' ])
41
41
def status ():
42
- return jsonify ({'success' :True }), 200 , { 'ContentType' : 'application/json' }
42
+ return jsonify ({'success' :True })
43
43
44
44
45
45
def quickstart_tutorial ():
@@ -54,6 +54,15 @@ def quickstart_tutorial():
54
54
print ("\t 2. In the Dashboard or API, set your FreeClimb Application Voice Url to the dynamic endpoint NGROK generated.\n " )
55
55
print (api_server )
56
56
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' })
57
66
58
67
if __name__ == '__main__' :
59
68
quickstart_tutorial ()
0 commit comments