synapse/http/servlet.py
def register(self, http_server):
        """ Register this servlet with the given HTTP server. """
        if hasattr(self, "PATTERNS"):
            patterns = self.PATTERNS

            for method in ("GET", "PUT", "POST", "OPTIONS", "DELETE"):
                if hasattr(self, "on_%s" % (method,)):
                    method_handler = getattr(self, "on_%s" % (method,))
                    http_server.register_paths(method, patterns, method_handler)

        else:
            raise NotImplementedError("RestServlet must register something.")
 Register this servlet with the given HTTP server. 
Register this servlet with the given HTTP server.
Register this servlet with the given HTTP server .
def register(self, http_server):
        if hasattr(self, "PATTERNS"):
            patterns = self.PATTERNS
            for method in ("GET", "PUT", "POST", "OPTIONS", "DELETE"):
                if hasattr(self, "on_%s" % (method,)):
                    method_handler = getattr(self, "on_%s" % (method,))
                    http_server.register_paths(method, patterns, method_handler)
        else:
            raise NotImplementedError("RestServlet must register something.")
def register ( self , http_server ) : if hasattr ( self , "PATTERNS" ) : patterns = self . PATTERNS for method in ( "GET" , "PUT" , "POST" , "OPTIONS" , "DELETE" ) : if hasattr ( self , "on_%s" % ( method , ) ) : method_handler = getattr ( self , "on_%s" % ( method , ) ) http_server . register_paths ( method , patterns , method_handler ) else : raise NotImplementedError ( "RestServlet must register something." )
Register this servlet with the given HTTP server.
Register this servlet with the given HTTP server .
""" Register this servlet with the given HTTP server. """
self
http_server