Stopping silent retries in HttpURLConnection

后端 未结 4 2473
独厮守ぢ
独厮守ぢ 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:13

    For POST calls set

    httpURLConnection.setChunkedStreamingMode(0);
    

    and this should fix the silent retries. The bug report and workaround can be found here.

提交回复
热议问题