duplicate requests from HttpClient

前端 未结 3 613
后悔当初
后悔当初 2021-02-03 12:56

I am using HttpClient 4.0.1 on android... I make a POST request with a header set that is the current millis... I see that request hit the server twice within a few millis (5-10

3条回答
  •  花落未央
    2021-02-03 13:48

    Retry PolicyWe can customized

    WITH VOLLEY REQUEST

    stringRequest.setRetryPolicy(new DefaultRetryPolicy( 0, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT)); volleySingleton.addToRequestQueue(stringRequest);

提交回复
热议问题