R

Ravina • 3.96K Points
Extraordinary

Q. How do you set a custom response header in FastAPI?

  • (A) By editing request.headers
  • (B) Using response.headers['key'] = 'value'
  • (C) Using HeaderResponse
  • (D) Using Header.set()
  • Correct Answer - Option(B)
  • Views: 24
  • Filed under category Fast API
  • Hashtags:

Explanation by: Ravina
You can modify the response headers using `response.headers['key']`.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.