code: def _get_method(self, request):
          
          methodname = request.method.lower()
          method = getattr(self, methodname, None)
          if not method or not callable(method):
              raise errors.MethodNotAllowed()
          return method
docs: Figure out the requested method and return the callable.