Witam, mam mały problem, Indy nie chce wykonywać kodu zawartego w wątku
Kod procedure Execute wątku:
procedure TQuery.Execute;
var
I: LongInt;
Client: TIdHTTP;
POSTParams: TStringStream;
begin
FreeOnTerminate := True;
Client:= TIdHTTP.Create(nil);
POSTParams := TStringStream.Create(MultiQueryBOTFrm.GETPOSTEdit.Text);
Client.ReadTimeout:= StrToInt(MultiQueryBOTFrm.ReadTimeOutEdit.Text);
Client.HandleRedirects := True;
Client.Request.ContentType := 'application/x-www-form-urlencoded';
if MultiQueryBOTFrm.UseProxyCheck.Checked then
for I:=1 to StrToInt(MultiQueryBOTFrm.RepeatEdit.Text) do
begin
if MultiQueryBOTFrm.MethodType.Text = 'GET' then
Client.Get(MultiQueryBOTFrm.URLEdit.Text+'?'+MultiQueryBOTFrm.GETPOSTEdit.Text)
else
Client.Post(MultiQueryBOTFrm.URLEdit.Text, POSTParams)
end;
Client.Free;
end;
Wątek wywołuję przez
Client:= TQuery.Create(False);