Add Credentials to a HttpWebRequest

By [)ia6l0 iii

Use the Credentials property of the Http Web Request to specify Credentials.

HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(value);
webRequest.Credentials = new NetworkCredential(userName, password);

Add Credentials to a HttpWebRequest  (1267 Views)