R

Ravina • 3.96K Points
Extraordinary

Q. What is the role of the `status_code` parameter in FastAPI routes?

  • (A) To change the HTTP request method
  • (B) To set the expected response HTTP status code
  • (C) To validate input types
  • (D) To delay response time
  • Correct Answer - Option(B)
  • Views: 42
  • Filed under category Fast API
  • Hashtags:

Explanation by: Ravina

`status_code` sets the HTTP status code that will be returned by the endpoint.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.