TCP connection is not reused for HTTP requests with HttpURLConnection

后端 未结 2 471
刺人心
刺人心 2020-12-17 03:16

I\'m have created an application which sends GET requests to a URL, and then downloads the full content of that page.

The client sends a GET to e.g. stackoverflow.c

2条回答
  •  無奈伤痛
    2020-12-17 03:37

    HttpURLConnection will reuse connections if it can!

    For this to work, several preconditions need to be fulfilled, mostly on the server side. Those preconditions are described in the article linked to above.

提交回复
热议问题