title: Retrofit 2 RequestBody writeTo() method called twice
body: <p>Retrofit 2 RequestBody writeTo() method called twice, the code which I used is given below:</p>
  
  <pre><code>ProgressRequestBody requestVideoFile = new ProgressRequestBody(videoFile, new ProgressRequestBody.UploadCallbacks() {
  
      VideoUploadStore store = new VideoUploadStore();
  
      @Override
      public void onProgressUpdate(int percentage) {
          if (!mIsCancelled) {
              Log.i("UploadServiceManager", "Read Percentage : " + percentage);
              data.setUploadPercentage(percentage);
              store.updateUploadData(data);
          }
      }
  
      @Override
      public void onError() {
          if(!mIsCancelled) {
              data.setUploadPercentage(0);
              store.updateUploadData(data);
          }
      }
  
      @Override
      public void onFinish() {
  
      }
  });
  MultipartBody.Part multipartVideo = MultipartBody.Part.createFormData("File", videoFile.getName(), requestVideoFile);
  </code></pre>