Stopping silent retries in HttpURLConnection

后端 未结 4 2548
独厮守ぢ
独厮守ぢ 2021-02-20 16:50

I\'m using HttpURLConnection on Android KitKat to POST some data to a server. The server takes a long time to respond, and the connection is silently retry

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-20 17:25

    You need to set System.setProperty("sun.net.http.retryPost", "false")

提交回复
热议问题