Skip to main content

Module media

Module media 

Source
Expand description

Decide how to treat a fetched body. The HTML extractor only makes sense for HTML; running it over a JSON API response, a raw .txt, or a Markdown file would mangle or drop the content. We classify by Content-Type when present, and sniff the body otherwise.

Enums§

Media

Functions§

classify
Classify a body using its Content-Type header if available, else by sniffing the first non-whitespace bytes.