Difference between revisions of "SetProxyDetails"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> procedure SetProxyDetails(const iHttp: Integer; const IP: AnsiString; const Port: Integer); </source> ==Availability== SCAR Div...")
 
(Example)
 
Line 22: Line 22:
 
   i := InitializeHTTPClient(True, True);
 
   i := InitializeHTTPClient(True, True);
 
   try
 
   try
     SetProxyDetails(i, Host, Port);
+
     SetProxyDetails(i, Host, Port);
 
     WriteLn(GetHTTPPage(i, 'http://www.google.com/'));
 
     WriteLn(GetHTTPPage(i, 'http://www.google.com/'));
 
   finally
 
   finally

Latest revision as of 22:58, 2 November 2011

Definition

procedure SetProxyDetails(const iHttp: Integer; const IP: AnsiString; const Port: Integer);

Availability

SCAR Divi 3.20 > Current

Description

Sets up the proxy details for an open HTTP connection specified by iHttp. The proxy IP is given by the string IP and the port is given by Port.

Example

var
  i: Integer;

const
  Host = '123.45.67.89'; // Host IP
  Port = 1234;           // Host Port

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

See Also