Connecting Sparkle client via proxy servers

Hi,

I'm looking to utilise the TWinHttpEngine.ProxyMode property to use the Sparkle HTTP client to connect via proxy servers.  I understand the 3 different modes available, but I can't see where to set the username and password required by some proxy servers when using it in 'Custom' mode.  Has this been implemented?

Thanks,
Jonathan

You can use the following code (FClient if object of class THttpClient):


uses
  {…}, Sparkle.WinHttp.Engine, Sparkle.WinHttp.Api;




  TWinHttpEngine(FClient.Engine).BeforeWinHttpSendRequest :=
    procedure(Handle: HINTERNET)
    begin
      WinHttpCheck(WinHttpSetOption(Handle, WINHTTP_OPTION_PROXY_USERNAME, PWideChar(UserName), Length(UserName));
      WinHttpCheck(WinHttpSetOption(Handle, WINHTTP_OPTION_PROXY_PASSWORD, PWideChar(Password), Length(Password));
    end;

Many thanks Wagner.