code: 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
docs: 获取 type