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

后端 未结 6 2012
臣服心动
臣服心动 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:05

    I would generally recommend URLConnection because it can get updated with the JDK. In one case we had a call that used an older version of HTTP Client which didn't support TLS v1.2.

    However, I wouldn't use URLConnection directly, I would generally use a higher level API like JAX-RS Client or the wsimport Clients to connect to another site.

提交回复
热议问题