fphttpclient
From Free Pascal wiki
Jump to navigationJump to search
fphttpclient is supplied with FPC.
Examples
Get body of an HTTP page
uses fphttpclient;
Var
S : String;
begin
With TFPHttpClient.Create(Nil) do
try
S:=Get(ParamStr(1));
finally
Free;
end;
Writeln('Got : ',S);
end.
If you want to write even less lines of code, in FPC 2.7.1 you can use the class method:
s := TFPCustomHTTPClient.SimpleGet('http://a_site/a_page');