InitializeHTTPClient

From SCAR Divi Manual
Revision as of 19:09, 26 June 2011 by Freddy (talk | contribs) (Example)
Jump to: navigation, search

Definition

function InitializeHTTPClient(const HandleCookies, HandleRedirects: Boolean): Integer;

Availability

SCAR Divi 3.00 > Current

Description

This function creates a new HTTP connection and returns the index to it in the HTTP resource manager. You can specify whether it has to handle cookies and/or redirects by setting the HandleCookies and/or HandleRedirects to true.

Example

var
  i: Integer;

begin
  i := InitializeHTTPClient(True, True);
  try
    WriteLn(GetHTTPPage(i, 'http://www.google.com/'));
  finally
    FreeHTTPClient(i);
  end;
end.

See Also