Skip to content

Instantly share code, notes, and snippets.

@vestel
Created September 12, 2014 10:47
Show Gist options
  • Save vestel/9837acc6cff8bf9f761d to your computer and use it in GitHub Desktop.
Save vestel/9837acc6cff8bf9f761d to your computer and use it in GitHub Desktop.
Header in Flask
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