How to extract website Source code in Delphi

delphi

Solution

Using Indy you can simply do

Strings.Text := IdHttp.Get(URL);

You really don't want to spin up a TWebBrowser for a simple HTTP GET.

Problem

I need a way to extract the website source code in Delphi and put it in a TStrings or TStringList exactly the same way when you click on View Source in the Internet Explorer and it opens the notepad and shows the source code. Maybe we can use TWebBrowser or I don't know Thank you.

Original source