Skip to content

Commit

Permalink
Merge pull request #109 from eatli/patch-1
Browse files Browse the repository at this point in the history
Missing import
  • Loading branch information
danielbsig committed Dec 22, 2014
2 parents f516ef1 + c5c2da3 commit 1451543
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Week08/Flask-Restful.MD
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ This shows a very simple API using Flask Restful. This code should be sufficient
```python
from flask import Flask
from flask.ext import restful
from flask import request
import json

app = Flask(__name__)
api = restful.Api(app)
Expand All @@ -34,7 +36,7 @@ class NameAPI(restful.Resource):
else:
return 'Bad request', 404

api.add_resource(NameAPI, '/api/name/')
api.add_resource(NameAPI, '/api/name')

if __name__ == '__main__':
app.run(debug=True)
Expand Down

0 comments on commit 1451543

Please sign in to comment.