pub fn sniff_content_type(payload: &[u8], header: Option<&str>) -> ContentTypeExpand description
MIME type from a STOMP content-type header, or a sniff of the
body.
The header wins when its type (before ;) is non-empty. Otherwise
a leading { is JSON, a leading < is XML, and everything else is
application/octet-stream. Does not fail.