Question 31
Consider the following resource API created with help of flask_restful.
from flask import Flask, requestfrom flask_restful import Resource, Api
app = Flask(__name__)
api = Api(app)
class TestApi(Resource): def post(self, state, city): return {"state": state, "capital": city}
def get(self): info = request.args return info
api.add_resource(TestApi, '/india','/india/<state>/<city>')
app.run(debug = True)If the above application is running locally on http://127.0.0.1:5000, answer the given subquestions