HttpAddRequestHeaderAuthorizationBasic
Adds the “Authorization: Basic” header to the HTTP request.
#include <httpexp.h>
#include <httpclnt.h>
int HttpAddRequestHeaderAuthorizationBasic (
HINTERNET hndl,
char *pzUsername,
char *pzPassword);
If successful, returns 0. Otherwise, returns a nonzero error code.
The HttpAddRequestHeaderAuthorizationBasic function uuencodes the name and password and adds them to the end of the tag.
WARNING:This function should be used only on secure connections because uuencoding is not a form of encryption, and the username and password are easily extracted from unencrypted packets.