Created
February 15, 2014 21:57
-
-
Save RobSpectre/9025721 to your computer and use it in GitHub Desktop.
Setting a conversation cookie using Flask
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from flask import session | |
from flask import make_response | |
from twilio import twiml | |
app = Flask(__name__) | |
@app.route('/tracking_conversation', methods=['POST']) | |
def tracking_conversation(): | |
twiml_response = twiml.Response() | |
twiml_response.message("Hello world.") | |
flask_response = make_response(str(response)) | |
flask_response.set_cookie('message_count', 1, expires=strftime('%a, %d %b %Y %H:%M:%S GMT') | |
return flask_response | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment