Skip to content

Instantly share code, notes, and snippets.

@tfogo
Created November 16, 2014 13:30
Show Gist options
  • Select an option

  • Save tfogo/395e0a6e1c869f7b0ac0 to your computer and use it in GitHub Desktop.

Select an option

Save tfogo/395e0a6e1c869f7b0ac0 to your computer and use it in GitHub Desktop.
twiliopython
from flask import Flask, request
app = Flask(__name__)
@app.route('/message', methods=['POST'])
def message():
return '''
<Response>
<Message>
Hey WIT!
</Message>
</Response>
'''
@app.route('/voice', methods=['POST'])
def voice():
return '''
<Response>
<Play>
https://bit.ly/phaltsw
</Play>
</Response>
'''
if (__name__) == "__main__":
app.run(debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment