R

Ravina • 3.96K Points
Extraordinary

Q. Which decorator is used to create a POST endpoint in FastAPI?

  • (A) @app.route('POST')
  • (B) @app.submit()
  • (C) @app.post()
  • (D) @post.route()
  • Correct Answer - Option(C)
  • Views: 9
  • Filed under category Fast API
  • Hashtags:

Explanation by: Ravina
The `@app.post()` decorator is used to define a POST endpoint in FastAPI.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.