Let's see whether you can answer the following questions correctly:
- Which of the following methods allows us to set the HTTP status code for a response in a subclass of
tornado.web.RequestHandler
?self.write_status
self.__cls__.write_status_code
self.set_satus
- Which of the following methods allows us to write the response in a subclass of
tornado.web.RequestHandler
?self.write_response
self.write
self.set_response
- The main building blocks for a RESTful API in Tornado are subclasses of which of the following classes?
tornado.web.GenericHandler
tornado.web.RequestHandler
tornado.web.IncomingHTTPRequestHandler
- If we just want to support the
GET
andPATCH
methods, we can override theSUPPORTED_METHODS
class variable with which of the following values?("GET", "PATCH")
{0: "GET", 1: "PATCH"}
{"GET": True, "PATCH": True, "POST": False, "PUT": False}
- The list of tuples for the
tornado.Web.Application
constructor is composed of which of the following?- A regular expression (
regexp
) and atornado...
- A regular expression (