title: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity
body: <p>I am using below code to do http post and upload a file and getting below mentioned error.</p>
  
  <p>Am I missing something here?</p>
  
  <pre><code>MultipartEntityBuilder builder = MultipartEntityBuilder.create();   
  builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
  HttpPost request = new HttpPost(serverEndpointUrl + attachementsResource);
  System.out.println(serverEndpointUrl + attachementsResource);
  request.addHeader("Authorization", getBasicAuth(Authorization));
  builder.addBinaryBody("file", fileContent,ContentType.APPLICATION_OCTET_STREAM, fileName);
  HttpEntity multipart = builder.build();
  request.setEntity(multipart);
  response = client.execute(request);
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity
      at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:107)
      at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
      at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
  </code></pre>
  
  <p>Please suggest</p>