R

Ravina • 3.96K Points
Extraordinary

Q. How can you make a FastAPI route accessible at `/api/items`?

  • (A) Use @app.route('/api/items')
  • (B) Use @app.endpoint('/api/items')
  • (C) Use @app.get('/api/items')
  • (D) Use @app.path('/api/items')
  • Correct Answer - Option(C)
  • Views: 28
  • Filed under category Fast API
  • Hashtags:

Explanation by: Ravina

`@app.get('/api/items')` defines a GET route at `/api/items`.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.