Huh? did anybody notice the real culprit? Free What?
Lot's of code with little substance but there is a blatant bug:
procedure TForm1.Button1Click(Sender: TObject);
begin
with TFPHttpClient.Create(nil) do begin
s:= get('https://www.google.com');
if s <> ('')
then ShowMessage (copy(s,1,50))
else ShowMessage ('Please Connect To Internet!!'); // with block ends here...
free; // Huh? this is not in the with scope
end;
end;
And please point out the "Huh?"
Free is within the scope....
Don't you see that, the object is created and entered within a BEGIN....END block...
Free is part of the created object...
Oh well...
Must be age, cause I can't see what you are seeing..