Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- # coding: utf-8
- from flask import Flask, Response
- from flask_restful import Resource, Api
- import json
- app = Flask(__name__)
- # Create the API
- API = Api(app)
- @app.route('/')
- def hello_world():
- return Response('Here, with Response it works well: höne')
- class APICLASS(Resource):
- """
- """
- def get(self, id):
- return [
- {
- "hey": 11,
- "test": "höne"
- }]
- API .add_resource(APICLASS, '/<string:id>')
- if __name__ == '__main__':
- app.run(debug=True)
- [
- {
- "hey": 11,
- "test": "hu00f6ne"
- }]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement