connexion

is it possible to use flask_socketio with connexion?

喜欢而已 提交于 2020-04-30 08:47:15
问题 I have a django app (frontend) which sends requests to a connexion api (backend). Now I want to add info to the user to know the progression of the request in real-time upon making a request to my api. Example: from my django app, if I submit a form it will launch a request via requests.post and will show me some text ( ie: creating, deleting, updating ...) I tried using flask-socketio but I found no example of how it could be done. (connexion with socketio) PS: I want to use connexion for my

is it possible to use flask_socketio with connexion?

房东的猫 提交于 2020-04-30 08:46:45
问题 I have a django app (frontend) which sends requests to a connexion api (backend). Now I want to add info to the user to know the progression of the request in real-time upon making a request to my api. Example: from my django app, if I submit a form it will launch a request via requests.post and will show me some text ( ie: creating, deleting, updating ...) I tried using flask-socketio but I found no example of how it could be done. (connexion with socketio) PS: I want to use connexion for my

aiohttp - before request for each API call

人走茶凉 提交于 2019-12-01 13:26:39
问题 When I was using Flask, every API call is authenticated before processed: app = connexion.App(__name__, specification_dir='./swagger/', swagger_json=True, swagger_ui=True, server='tornado') app.app.json_encoder = encoder.JSONEncoder app.add_api('swagger.yaml', arguments={'title': 'ABCD API'}) # add CORS support CORS(app.app) @app.app.before_request def before_request_func(): app_id = request.headers.get("X-AppId") token = request.headers.get("X-Token") user, success = security.Security()