title: Send a ZIP file for a server using kotlin and retrofit
body: <p>I looking for a way to send a zip file for a server using retrofit in kotlin. Some functions are deprecated that's make this more dificulte. When I star the request the response is NULL, there is no error.
  That is the function who start the request:</p>
  <pre><code>fun sendZipeFile() {
              val retrofitClient = NetworkUtils
                  .getRetrofitInstance(&quot;http://url.com&quot;)
              val sendZipeFileEndPoint = retrofitClient.create(SendZipeFile::class.java)
  
              var file = File(&quot;/storage/emulated/0/Download/file.zip&quot;)
              val requestImageFile = file?.asRequestBody(&quot;multipart/form-data&quot;.toMediaType())
              val callback = startZipeFileUpload.zipeFileUpload(&quot;application/zip&quot;,&quot;Atualização&quot;, requestImageFile, &quot;0.0.2&quot;)
             
  
              callback.enqueue(object : Callback&lt;UploadZipFile&gt; {
                  override fun onFailure(call: Call&lt;UploadZipFile&gt;, t: Throwable) {
  
                      t.message
                      t.fillInStackTrace()
  
                  }
                  override fun onResponse(call: Call&lt;UploadZipFile&gt;, response: Response&lt;UploadZipFile&gt;) {
                          val responseString = response.body()
  
                  }
  
  
  
              })
  
          }
  </code></pre>
  <p>Below is an interface</p>
  <pre><code>interface SendZipeFile{
      @Headers(&quot;Content-Type: multipart/form-data&quot;)
  
      @Multipart
      @POST(&quot;updateModelsAndParameters/&quot; +
              &quot;&quot;)
      fun zipeFileUpload(
          @Header(&quot;Content-Type&quot;)  contentType: String?,
          @Part(&quot;description&quot;)  description: String?,
          @Part(&quot;Zip&quot;) file: RequestBody?,
          @Part(&quot;flag&quot;)flag: String?,
  
      ): Call&lt;UploadZipFile&gt;
  
  
  }
  </code></pre>
  <p>And the data class</p>
  <pre><code>import com.google.gson.annotations.SerializedName
  
  data class UploadZipFile(
      @SerializedName(&quot;status_code&quot;) var statusCode: Int? = null,
      @SerializedName(&quot;message&quot;) var message: String? = null,
      @SerializedName(&quot;elapsed_ms&quot;) var elapsedMs: Double? = null,
      @SerializedName(&quot;response&quot;) var resposta: Boolean? = null,
  )
  </code></pre>