What should I know about the trade-offs between these two HTTP libraries?
Depends on your needs I would say. I used the java.net one while doing simple GETs and POSTs. Suddenly I needed support for session cookies etc, and I switched to the HTTPClient.
That's also my general recommendation. Don't introduces dependencies on third-party libraries for simple tasks that can be easily done without.
Well, the apache library is easy to use and reliable, but as aioobe said introduces external dependencies (given that has apache license that should not be a problem for commercial products). IMHO if you have to handle a lot of simultaneous connections I will go for the apache lib as the performance will be probably better.
Check this article: http://lassewesth.blogspot.com.es/2009/05/i-like-apache-http-client-over.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With