title: Android Retrofit Upload File with authorization Body
body: <p>I'm using retrofit to connect to server which needs authorization token in POST Data. Example For the request:</p>
  
  <pre><code>https://adress/inboxes
  POST data:
  token=jasdf807gb123uy40bviubva08sdyv123&amp;message_id=1&amp;
  </code></pre>
  
  <p>I use method like this and its works fine:</p>
  
  <pre><code>@POST("/inboxes")
      Call&lt;InboxesResponse&gt; getInbox(@Header("Authorization") String authorization, @Header("Content-Type") String contentType, @Body RequestBody body);
  </code></pre>
  
  <p>I put token and other parameters into RequestBody:</p>
  
  <pre><code>RequestBody body =
                  RequestBody.create(MediaType.parse("text/plain"), text.toString());
  </code></pre>
  
  <p>All this works fine. But i cant figure out how to  work with file uploading method:</p>
  
  <pre><code>Example:
  https://adress/fileUpload
  POST data:
  token=jasdf807gb123uy40bviubva08sdyv123
  File body
  </code></pre>
  
  <p>So i need  to use <code>MultipartBody.Part file</code> to upload file, but how to combine MultipartBody with RequestBody which contains token? Or how to do this right? i'm confused..</p>