Question 7
Consider the following Python code snippet.
from flask import Flaskfrom flask_restful import Api, Resource
app = Flask(__name__)api = Api(app)
class MyApi(Resource): def get(self): return {"greet":"Hello from GET Api!"}
def put(self): return {"greet":"Hello from PUT Api!"}
api.add_resource(MyApi, '/api/get', '/api/put', '/api/post')
app.run()If this application is running locally on http://127.0.0.1:5000, which of the following curl commands will throw an error?
curl http://127.0.0.1:5000/api/get -X getcurl http://127.0.0.1:5000/api/put -X putcurl http://127.0.0.1:5000/api/post -X postcurl http://127.0.0.1:5000/api/get -X putcurl http://127.0.0.1:5000/api/put -X getcurl http://127.0.0.1:5000/api/post -X get
Only 3
Only 3 and 4
Only 5 and 6
Only 3, 4, 5 and 6