set_type(type, header='Content-Type', requote=True)
Set the main type and subtype for the Content-Type header. type must be a string in the form maintype/subtype, otherwise a ValueError
is raised.
This method replaces the Content-Type header, keeping all the parameters in place. If requote is False
, this leaves the existing header’s quoting as is, otherwise the parameters will be quoted (the default).
An alternative header can be specified in the header argument. When the Content-Type header is set a MIME-Version header is also added.
Please login to continue.