def type(self) -> Optional[str]:
        """
        获取 type
        """
        type_str = cast(Optional[str], self.get("Content-Type"))
        if type_str is not None:
            return type_str.split(";")[0]
        else:
            return None
def type ( self ) -> Optional [ str ] : type_str = cast ( Optional [ str ] , self . get ( "Content-Type" ) ) if type_str is not None : return type_str . split ( ";" ) [ 0 ] else : return None
获取 type