* * *

Author Topic: THTTPSend and cache  (Read 177 times)

cappe

  • New member
  • *
  • Posts: 45
THTTPSend and cache
« on: September 11, 2017, 10:16:17 am »
Hi,

i use the THTTPSend command in order to get txt file from my site

procedure TForm1.Button1Click(Sender: TObject);
var URL: string;
    Params: string;
    Response: TMemoryStream;
    r:THTTPSend;
begin
   r:=THTTPSend.Create;
   URL:= ......
   r.HTTPMethod('GET',URL);
   Memo1.Lines.Add(r.ResultString);
   r.Free
end;

  the site returns each time a different value.
  the first download return the correct value, but the second time return return the previous value (cache value, I think) .

There is a way to clear the cache at each get request of Thttpsend?
 
« Last Edit: September 11, 2017, 11:10:23 am by cappe »

tudi_x

  • Sr. Member
  • ****
  • Posts: 282
Re: THTTPSend and cache
« Reply #1 on: September 11, 2017, 10:57:39 am »
hi,
try releasing r. freeandnil(r).

cappe

  • New member
  • *
  • Posts: 45
Re: THTTPSend and cache
« Reply #2 on: September 11, 2017, 11:12:20 am »
hi,
try releasing r. freeandnil(r).

there was an error in the list above, there was already r.free.

But it does not work anyway

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus