Fetch icon indicating copy to clipboard operation
Fetch copied to clipboard

How to set timeout?

Open fernandodeveloper opened this issue 4 years ago • 1 comments

How to set timeout?

I'm using http default download

final FetchConfiguration fetchConfiguration = new FetchConfiguration.Builder(this) .enableRetryOnNetworkGain(true) .setAutoRetryMaxAttempts(2) .setDownloadConcurrentLimit(2) .setHttpDownloader(new HttpUrlConnectionDownloader(Downloader.FileDownloaderType.SEQUENTIAL)) .build(); Fetch.Impl.setDefaultInstanceConfiguration(fetchConfiguration);

call

` request = new Request(Constante.REST_METODO_DOWNLOAD_IMG_PRODUTO_ZIP, DirectoryUtils.getPastaAppSinc().concat("/imgprodutos.zip")); request.setPriority(Priority.HIGH); request.setAutoRetryMaxAttempts(3);

        request.setNetworkType(NetworkType.ALL);
        request.addHeader("Authorization", "Basic " + encodedCretentials);
        fetch.addListener(this);
        fetch.enqueue(request, updatedRequest -> {
            aguarde(true);
            request = updatedRequest;
        }, error -> {
            aguarde(false);
        });`

fernandodeveloper avatar Feb 24 '21 20:02 fernandodeveloper

I have the same question.

Set setHttpDownloader(getOkHttpDownloader()) <<

junior-jornada avatar Oct 01 '21 16:10 junior-jornada