Home »
MCQs »
FastAPI MCQs
Which of the following is a decorator for defining a route or endpoint that handles GET requests?
28. Which of the following is a decorator for defining a route or endpoint that handles GET requests?
- @app.getter()
- @app.get()
- @app.get_request()
Answer: B) @app.get()
Explanation:
@app.get() is a decorator for defining a route or endpoint that handles GET requests.