URLConnection or HTTPClient : Which offers better functionality and more efficiency?

后端 未结 6 2013
臣服心动
臣服心动 2020-11-27 18:45

I looking to create a login form for an android application. I want to use a post method to send information to the server side where it is handle by a PHP file; which in tu

6条回答
  •  天涯浪人
    2020-11-27 19:06

    Though the tag is specifically for Android, in general HttpURLConnection is also the better choice when it comes to Java EE applications as it will utilize the HTTP stack that comes with the application server which includes configuration of HTTPS certificates in the application server level rather than the code.

    It will also allow you to obtain the latest version of SSLs provided by the application server stack rather than being stuck with an old version of httpclient that may not work with TLS 1.2

提交回复
热议问题