code: def check_method_allowed(cls, request):
          
          if not request.method in cls._meta.allowed_methods:
              raise HttpError(
                  'Method \'%s\' not allowed on this resource.' % request.method,
                  status=status.HTTP_405_METHOD_NOT_ALLOWED)
docs: Ensure the request HTTP method is permitted for this resource.
  
          Raising a ResourceException if it is not.