Default type of request.args or request.json is multidict. Converts it to dict so that can be passed to make_request
(multidict)
| 19 | app = Flask(__name__) |
| 20 | |
| 21 | def get_args(multidict): |
| 22 | """Default type of request.args or request.json is multidict. Converts it to dict so that can be passed to make_request""" |
| 23 | data = {} |
| 24 | for key in multidict.keys(): |
| 25 | data[key] = multidict.get(key) |
| 26 | return data |
| 27 | |
| 28 | @app.route('/api/<command>', methods=['GET']) |
| 29 | def rawapi(command): |