title: Retrofit MultipartBody.Part Not Sendig Data
body: <p>I have tested the api with postman it is working fine.So no issue from API end. I am sending multiple params with files. I have also logging enabled in retrofit via OkHttpClient Interceptor. In logging also data is sent is showing. <strong>But validator of api is throwing error 'title' field is required.</strong></p>
  <pre><code> @Multipart
  @PUT(&quot;song/{id}&quot;)
  Single&lt;JsonObject&gt; updateSong(@Path(&quot;id&quot;) int song_id,@Part MultipartBody.Part title, @Part MultipartBody.Part  cat_id, @Part MultipartBody.Part  playlist_id,
                                @Part MultipartBody.Part audio_file, @Part MultipartBody.Part thumbnail_file);
  </code></pre>
  <p>Here is code of API[Laravel PHP]:</p>
  <pre><code>public function update(Request $request, $id)
  {
      //
  
      $validator = Validator::make($request-&gt;all(),[
          'audio_file' =&gt;'mimes:application/octet-stream|nullable,
          audio/mpeg,mpga,mp3,wav',
          'thumbnail_file' =&gt; 'mimes:jpeg,png,jpg,gif,svg|max:2048|nullable',
          'title' =&gt; 'required',
  
      ]);
  
      if ($validator-&gt;fails()) { 
          return response()-&gt;json(['status'=&gt;false,'data'=&gt;null,'message'=&gt;$validator-&gt;errors()]); 
      }else{
          return response()-&gt;json(['status'=&gt;true,'data'=&gt;null,'message'=&gt;null]); 
  
      }
  </code></pre>
  <p>Here is the log of retrofit:</p>
  <p><a href="https://i.stack.imgur.com/QHi9M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QHi9M.png" alt="enter image description here" /></a></p>
  <p>This way I am sending data:</p>
  <pre><code>  public Single&lt;JsonObject&gt; updateSong(int song_id,String title, int cat_id,int playlist_id, MultipartBody.Part audio_file, MultipartBody.Part thumbnail_file){
      MultipartBody.Part titleBody = MultipartBody.Part.createFormData(&quot;title&quot;, title);
  
      MultipartBody.Part songCatIdBody;
      MultipartBody.Part playlistIdBody;
      if (cat_id&gt;0){
          songCatIdBody = MultipartBody.Part.createFormData(&quot;song_category_id&quot;, String.valueOf(cat_id));
      }else {
          songCatIdBody = MultipartBody.Part.createFormData(&quot;song_category_id&quot;, null);
  
      }
      if (playlist_id&gt;0){
          playlistIdBody = MultipartBody.Part.createFormData(&quot;playlist_id&quot;, String.valueOf(playlist_id));
      }else {
          playlistIdBody = MultipartBody.Part.createFormData(&quot;playlist_id&quot;, null);
  
      }
  
      return songAPI.updateSong(song_id,titleBody,songCatIdBody,playlistIdBody,audio_file,thumbnail_file);
  }
  </code></pre>
  <p><strong>Update:</strong></p>
  <p>The problem is solved if I make the API route to POST. I think PUT request not supported by retrofit for sending multipart data.</p>