I have a function using TIdCompressorZLib
and TIdHTTP
, like this:
pegar := tidhttp.create(nil);
compressor := TIdCompressorZLib.create(pegar);
seguro := TIdSSLIOHandlerSocketOpenSSL.create(pegar);
pegar.compressor := compressor;
pegar.Request.UserAgent := UserAgent;
pegar.Request.Accept := '*/*';
pegar.Request.AcceptEncoding := 'gzip, deflate';
pegar.Request.AcceptLanguage := 'pt-BR,pt;q=0.9,en-US;q=0.8,en;q=0.7';
pegar.HTTPOptions := [hoForceEncodeParams];
pegar.ReadTimeout := 60000;
pegar.ConnectTimeout := 60000;
pegar.HandleRedirects := true;
pegar.IOHandler := seguro;
pegar.CookieManager := cookm;
pagina := pegar.Get(proxima_pagina);
This code works fine when compiled for Windows, but not for Android. On Android, TIdCompressorZLib
does not unpack the source, returning unreadable characters.
Is there any way to fix this? I'm using Delphi 10.3.