UnsupportedMimeTypeException异常怎么办?

阅读更多
org.jsoup.UnsupportedMimeTypeException: Unhandled content type. Must be text/*, application/xml, or application/xhtml+xml. Mimetype=application/json; charset=UTF-8, URL=http: //mp.weixin.qq.com/cgi-bin/singlesend?t=ajax-response&lang=zh_CN
     at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:453)
     at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:410)
     at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:164)
     at org.jsoup.helper.HttpConnection.post(HttpConnection.java:159)
 
 
 
 
解决
Use ignoreContentType();
Document pod = Jsoup.connect(myURL).ignoreContentType(true).get();
UnsupportedMimeTypeException异常怎么办?_第1张图片

你可能感兴趣的:(UnsupportedMimeTypeException异常怎么办?)