記錄一下jsoup Unhandled content type異常
異常表現
完整的異常信息
org.jsoup.UnsupportedMimeTypeException: Unhandled content type. Must be text/*, application/xml, or application/xhtml+xml. Mimetype=image/png, URL
應該是請求頭裏面的請求類型(ContextType)不符合要求。
解決方法
ignoreContentType(true)