Using InternetSetOption to set the username and password when connecting to a REST service. I notice that WinInet does not send the Authorization header when I call HttpSentRequest even though I called InternetSetOption first. Seems ridiculous that you have to get a response from the server with a WWW-Authenication header first. That creates an entire extra request to the server on every request.
Is there a WinInet call to force the Authorization header on the first call or do I have to add it manually?