Fphttpclient

This is an old revision of Fphttpclient, edited by BigChimp at . The current revision is 85559.

Created page, more of a placeholder still...

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');