def _warning_handler(self, code: int):
        """处理300~399段状态码,抛出对应警告.

        Parameters:
            (code): - 响应的状态码

        Return:
            (bool): - 已知的警告类型则返回True,否则返回False

        """
        if code == 300:
            warnings.warn(
                "ExpireWarning",
                RuntimeWarning,
                stacklevel=3
            )
        elif code == 301:
            warnings.warn(
                "ExpireStreamWarning",
                RuntimeWarning,
                stacklevel=3
            )
        else:
            if self.debug:
                print("unknow code {}".format(code))
            return False
        return True
处理300~399段状态码,抛出对应警告.

        Parameters:
            (code): - 响应的状态码

        Return:
            (bool): - 已知的警告类型则返回True,否则返回False