java – httpURLConnection vs apache commons http

I just want to know if you have any problems using the Java default httpurlconnection class A bug that lets you switch to Apache Commons

Or just the exposed (ugly) interface of the class proves the birth of the third-party HTTP lib?

Disclosure: I heard some opposition to Java Net argument has some serious problems, but I find it hard to believe that classes as part of the Java core distribution still have problems after several versions of the JDK

Solution

What brought me to Apache httpclient was,

>Off road vehicles remain dynamic and supportive. > Cookie processing

You should now use httpclient 4 (APACHE HTTP component)

Editor: the first question has been discussed here many times See,

HttpURLConnection. getResponseCode() returns -1 on second invocation

HttpURLConnection: What’s the deal with having to read the whole response?

Even if the problem on Android seems worse, we see the exact problem on J2SE

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>