Doe the FPHTTPClient have built in proxy properties for proxy support?
I've tried a variety of both public and private proxies using this class & nothing seems to work.
Is the following syntax the right way to use proxies?:
uses
fphttpclient, openssl, opensslsockets;
procedure TForm1.Button1Click(Sender: TObject);
var
url, Response:string;
Client: TFPHttpClient;
begin
{ SSL initialization has to be done by hand here }
InitSSLInterface;
Client := TFPHttpClient.Create(nil);
try
Client.AddHeader('User-Agent', 'Mozilla/5.0 (compatible; fpweb)');
{ Allow redirections }
Client.AllowRedirect := true;
//Proxies:
Client.Proxy.Host := '198.23.239.134';
Client.Proxy.Port := 6540;
Client.Proxy.UserName := edit6.text;
Client.Proxy.Password := edit7.text;
memo1.text := Client.Get('https://google.com');
finally
Client.Free;
end;
end;
The only thing that happens is a "FAILED" message when trying to connect through a proxy.