title: Converting postman request to retrofit 2
body: <p>I have some http request related problem which I am not able to solve. </p>
  
  <p>I have aws url on which I have to make PUT request with mp4 video file to upload with header "Content-Type=video/mp4" </p>
  
  <p>I wrote the request in postman and successfully uploaded the mo4 video file. Here is my postman screenshot. <a href="https://i.stack.imgur.com/43nDk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/43nDk.png" alt="enter image description here"></a></p>
  
  <p>I tried implementing it in Android with retrofit and successfully did it as well with 200 response from server. But the problem is, video file is not being uploaded in correct format and getting error in aws console.</p>
  
  <blockquote>
    <p>Get this error: 4000 3f0fbcf1-1f39-4dc8-9d1e-332966662dd0: Amazon
    Elastic Transcoder could not interpret the media file.</p>
  </blockquote>
  
  <p>Here is my retrofit implementation</p>
  
  <pre><code>    @PUT
      @Multipart
      fun postVideo(@Header("Content-Type") contentType: String
                    , @Url url: String
                    , @Part video: MultipartBody.Part): Call&lt;ResponseBody&gt;
  </code></pre>
  
  <p>And posting body as following</p>
  
  <pre><code>val requestBody = RequestBody.create(MediaType.parse("video/mp4"),videoFile)
  val body = MultipartBody.Builder().addPart(requestBody).build()
  </code></pre>
  
  <p>As far as I know, I think my problem lies in the way I am attaching body to my request and header and url I am giving properly (as I am getting 200ok from server)</p>
  
  <p>My lack of HTTP knowledge is giving me nightmares, any help is appreciated.</p>