fphttpclient
From Free Pascal wiki
Jump to navigationJump to searchfphttpclient is supplied with FPC as part of the fcl-web package, and can be used by itself as well.
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');