@property
    def filename(self):
        default_filename = self.uri.path.segments[-1]
        try:
            content_type = dict(
                _.strip().partition("=")[0::2]
                for _ in self.__response.getheader("Content-Disposition").split(";")
            )
        except AttributeError:
            return default_filename
        return content_type.get("filename", default_filename)
The suggested filename from the `Content-Disposition` header field
dataset/ETHPy150Open nigelsmall/httpstream/httpstream/http.py/Response.filename