October 2016
Intermediate to advanced
418 pages
9h 52m
English
Tornado allows us to generate responses with any status code that is included in the http.HTTPStatus dictionary. We might use this dictionary to return easy to understand descriptions as the status codes, such as HTTPStatus.OK and HTTPStatus.NOT_FOUND after importing the HTTPStatus dictionary from the http module. These names are easy to understand but they don't include the status code number in their description.
We have been working with many different frameworks and micro-frameworks throughout the book, and therefore, we will borrow the code that declares very useful functions and variables related to HTTP status codes from the status.py file included in Django REST Framework, that is, the framework ...