I used Indy in Delphi for 6 days, and now I play with Indy 10. What I want to do is incredibly simple, but I don’t see an easy way to do this, so I'm missing something.
I want to do something like this:
Here is the actual code I'm using:
procedure TForm1.btnGetURLClick(Sender: TObject);
begin
moHeader.Lines.Clear;
moBody.Lines.Clear;
try
moBody.text := IdHttp1.Get(edURL.text);
finally
end;
end;
When the request is complete, http_result must contain the HTML from the specified URL. This does not seem to work, so I feel that perhaps I should use the IOHandler property or the OnWork event for the component, however the use does not seem obvious to me, and I could not find any working examples with Google. I am sure that this is what has been done before, so any help would be appreciated.
:
, , :
1. , ( - ?).
2. , .
3. , /os/Indy, . ( ).
, "Connection Closed Gracefully". , . TRY... , . , Indy Get.
, , , :
http://screencast.com/t/NDMzNTQ5
, HTML memo.