简体   繁体   中英

What exactly is 'Jsoup.connect(String url)'?

What I mean is; does the method connect(String url) in 'Jsoup'-static-class contain in its' source-code a call to a native http-client such as HttpURLConnection ? Or is it entirely it's own thing? If the latter, is it wise to use it in an Android environment?? Because it's recommended to use either Google-client or Java's-http-url-connection, in such a case.

Jsoup#connect just checks if the URL is valid.

It uses its own HttpConnection class and returns a Connection object also from Jsoup .

You should maybe look at the JavaDoc for Document .

Well... it appears it does! Thus it can work in Android.

:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM