March 2023
Intermediate to advanced
321 pages
4h 52m
English
Any web application returns an HTTP response to the client. The operation function in a FastAPI app returns a JSON response by default. In this chapter, we shall learn how we can manipulate the response to handle different requirements.
Response model
Cookies
Headers
Response status code
Response types
The FastAPI operation function JSONifies Python’s primary types, that is, numbers, string, list, dict, etc., as its response. It can also return an object of ...
Read now
Unlock full access