Is there a library which allows determining whether a given content type is binary or text-based?
Obviously text/*
is always textual, but for things like application/json
, image/svg+xml
or even application/x-latex
it's rather tricky without inspecting the actual data.