S

Shyam Dubey • 3.70K Points
Extraordinary

Q. What is the purpose of `status_code` parameter in FastAPI decorators?

  • (A) It sets the route path
  • (B) It determines form data validation
  • (C) It specifies the HTTP status code for the response
  • (D) It creates custom headers
  • Correct Answer - Option(C)
  • Views: 14
  • Filed under category Fast API
  • Hashtags:

Explanation by: Shyam Dubey
`status_code` allows you to set the expected HTTP status code for the route.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.