0

guys! I have to use proxy with authentication in my app where I connect to the server. (MFC app, WinHTTP lib). There is no problem to use simple proxy without username/pass. But how to specify auth method?

I tried the following, but it didn't work and returned me Error 87 (Incorrect PArameter) http://username:password@hostname.com

Is it correct?

Thanks,

Jeffrey Rasmussen
  • 367
  • 4
  • 8
  • 21

1 Answers1

0

It is not correct. First of all, password is not allowed to be embedded into the URI. However it is not the source of the problem: to provide WinHTTP with proxy authentication details you are expected to use WinHttpSetCredentials with:

AuthTargets [in]

WINHTTP_AUTH_TARGET_PROXY - Credentials are passed to a proxy.

Roman R.
  • 68,205
  • 6
  • 94
  • 158