2

Sorry for the double post: a friend of mine asked this on the mailing list but no one answered.

I would like to know how to correctly use the ProxyAuthenticationRequired event of an HTTPSocket. I mean, how can I pass the login/password if the proxy asks for the authentication?

Thanks!

dda
  • 6,030
  • 2
  • 25
  • 34
matteo
  • 147
  • 1
  • 1
  • 9

1 Answers1

3

I've never used a proxy with the HTTPSocket class, but I think this is how it works.

The ProxyAuthenticationRequired event passes four parameters, the proxy realm as a string, the HTTP headers as an InternetHeaders object, and the username and password as strings. The username and password are passed ByRef, so I believe the idea is for you to set these parameters yourself and then Return True from the ProxyAuthenticationRequired event:

Event ProxyAuthenticationRequired(Realm as String, Headers as InternetHeaders, ByRef Name as String, ByRef Password as String ) As Boolean
  Name = "MyUserName"
  Password = "MyPass"
  Return True
End Event
Andrew Lambert
  • 1,869
  • 1
  • 17
  • 31
  • thanks a lot for taking time to help me out on this ! I've already tried this but without the "Return True", think now it will finally work ! – matteo Sep 11 '12 at 23:13