Created
April 8, 2016 14:15
-
-
Save sivabudh/ee6bd24ec66dcd88181606f230f98d94 to your computer and use it in GitHub Desktop.
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 | |
from flask_restful import Resource, Api | |
app = Flask(__name__) | |
api = Api(app) | |
class HelloWorld(Resource): | |
def get(self): | |
return {'hello': 'world'} | |
def post(self): | |
import pdb; pdb.set_trace() | |
json = request.get_json() | |
return {'hello': 'blah'} | |
api.add_resource(HelloWorld, '/') | |
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