title: How to have a reliable Volley request with no retries policy
body: <p>When I am on a slow connection and making a POST request, Volley retries my request multiple times and after it all ends up hitting my <code>errorListener</code>. Sometimes, these retries actually succeeded in posting data.</p>
  
  <p>The user will assume that the request failed, but in truth, if they refreshed the data they'd see the data was POSTed twice to the server (or however many successful retries in the bunch).</p>
  
  <p>I want give Volley a very dumbed-down retry policy:</p>
  
  <p>I want it to try a request for 15 seconds and if the request doesn't reach the server within 15 seconds and comes back with a response to trigger the <code>errorListener</code>. I don't want it to retry at all. </p>
  
  <p>The only concern is if Volley tries, the request gets to the server within 20~25 seconds, but by then it triggered the <code>errorListener</code> and the data still got POSTed. </p>
  
  <p>Does HTTP follow a time-limit after which it is 100% the data won't get posted because the request took too long? Like maybe 40 seconds? If such, then I can have the request go on for 40 seconds.</p>
  
  <p>In all:</p>
  
  <p>No retries and ensure 100% that if data got posted on first try go to <code>successListener</code> and if it didn't get posted (request died due to taking too long or error response from server) <code>errorListener</code>.</p>
  
  <p>I was thinking of doing something with the defaultRetryPolicy... like <code>DefaultRetryPolicy(15000, 0, 1)</code>, though I think the last parameter doesn't matter because what is the point of back-off with no retries.</p>
  
  <p>How would I achieve what I asked two paragraphs back?</p>