#1 2016-11-19 00:17:34

HollosCs
Member
Registered: 2015-12-08
Posts: 56

OnProgress, OnDownload

Hello!

I can't use OnProgress and OnDownload for TWinHttpAPI, but not work.

  fClient := TSQLHttpClientWinHTTP.Create('localhost','888',fModel);

    TWinHttpAPI(fClient).OnProgress := DoProgress;
    TWinHttpAPI(fClient).OnDownload := DoDownload;
    TWinHttpAPI(fClient).OnDownloadChunkSize := 2;

Events not triggered. In TWinHttpAPI.InternalRetrieveAnswer: fOnDownload, fOnProgress is nil and fOnDownloadChunkSize = 0.

What's wrong my code?

Thx, Csaba

Offline

#2 2016-11-19 10:55:19

HollosCs
Member
Registered: 2015-12-08
Posts: 56

Re: OnProgress, OnDownload

Fund the solution (maybe not optimal)

fClient := TSQLHttpClientWinHTTP.Create('localhost','888',fModel);

    TWinHttp(fClient.Request)).OnProgress := DoProgress;
    TWinHttp(fClient.Request)).OnDownload := DoDownload;
    TWinHttp(fClient.Request)).OnDownloadChunkSize := 2;

Offline

Board footer

Powered by FluxBB