Created
September 12, 2014 10:47
-
-
Save vestel/9837acc6cff8bf9f761d to your computer and use it in GitHub Desktop.
Header in Flask
This file contains 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, request, Response | |
import unittest | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
response = Response("Done", 200) | |
for k,v in request.headers: | |
response.headers.add(k,v) | |
return 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