1

I cannot get the data of this with Jsoup. It can connect if I use this:

Connection connection = Jsoup.connect("http://android-forum.hu/feed.php");

But if I want to get the site data I got this exeption:

org.jsoup.UnsupportedMimeTypeException: Unhandled content type. Must be text/*, application/xml, or application/xhtml+xml. Mimetype=application/atom+xml; charset=UTF-8, URL=http://android-forum.hu/feed.php

I use this code:

Document doc = Jsoup.connect("http://android-forum.hu/feed.php").get();

So I want to get the page data. How to get it?

Zoltan Szilagyi
  • 292
  • 3
  • 16

1 Answers1

1

The UnsupportedMimeTypeException is thrown when the minetype of the response is not supported.

You can use ignoreContentType(true) to let Jsoup ignore minetype, try

Document doc = Jsoup.connect("http://android-forum.hu/feed.php")
                    .ignoreContentType(true)
                    .get();

(call it before .get)

Marco Acierno
  • 14,368
  • 7
  • 41
  • 53