soup.content_sniffer
Module for [ContentSniffer] class
Types 3
Sniffs the mime type of messages.
A #SoupContentSniffer tries to detect the actual content type of the files that are being downloaded by looking at some of the data before the class@Message emits its signal@Message::got-headers signal. #SoupContentSniffer implements iface@SessionFeature, so you can add content sniffing to a session with [soup.session.Session.addFeature] or [soup.session.Session.addFeatureByType].
Methods
ContentSniffer self()Returns `this`, for use in `with` statements.ContentSnifferGidBuilder builder()Get builder for [soup.content_sniffer.ContentSniffer] Returns: New builder objectstring sniff(soup.message.Message msg, glib.bytes.Bytes buffer, out string[string] params)Sniffs buffer to determine its Content-Type.Fluent builder for [soup.content_sniffer.ContentSniffer]
Methods