Created
May 27, 2015 02:44
-
-
Save MiyamonY/36715d7e7c942eaaee0c to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
from flask import Flask, make_response | |
from flask.ext.script import Manager | |
app = Flask(__name__) | |
manager = Manager(app) | |
@app.route('/string/') | |
def return_string(): | |
return 'Hello World!' | |
# @app.route('/object/') | |
# def return_object(): | |
# headers = {'Content-Type': 'text/plain'} | |
# return make_response('Hello, World!', status=200, headers=headers) | |
@app.route('/tuple/') | |
def return_tuple(): | |
return 'Hello, World!', 200, {'Content-Type':'text/plain'} | |
if __name__ == '__main__': | |
manager.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment