     GenServer.call(http, {:req, method, url, body, headers, opts}, :infinity)
   end
 
-  def download_file(http, url, path, progress_callback, payload, headers, stream_fun) do
+  def download_file(http, url, path, pg_callback, payload, hdrs, stream_fun) do
     case request(
            http,
            :get,
            url,
            payload,
-           headers,
+           hdrs,
            file: path,
            stream_fun: stream_fun,
-           progress_callback: progress_callback
+           progress_callback: pg_callback
          ) do
       {:ok, %Response{status_code: code}} when is_2xx(code) -> {:ok, path}
       {:ok, %Response{} = resp} -> {:error, resp}

          end)

        if redir do
          do_normal_request({method, redir, body, headers, opts, from}, file, state)
        else
          GenServer.reply(from, {:error, :no_server_for_redirect})
          {:noreply, state}
        end

      {:ok, %HTTPoison.Response{body: body, headers: headers, status_code: code}} ->
        GenServer.reply(from, {:ok, %Response{body: body, headers: headers, status_code: code}})
        {:noreply, state}

      {:ok, %AsyncResponse{id: ref}} ->

    |> do_multipart_request(http, meta, path)
  end

  defp do_multipart_request(
    {:ok, %Response{status_code: code, body: bin_body}},
    http,
    meta, path) when is_2xx(code)
  do
    with {:ok, body} <- Poison.decode(bin_body),
         {:ok, file} <- File.read(path) do
      url = "https:" <> body["url"]
