Reputation: 315
I have this wget request:
wget --http-user="user" --http-passwd="password"
www.example.com
In http request i wrote url address, but i don't know where to put login iformation. Thank you
Upvotes: 1
Views: 6241
Reputation: 1062995
How about:
string page;
using(var client = new WebClient()) {
client.Credentials = new NetworkCredential("user", "password");
page = client.DownloadString("http://www.example.com/");
}
?
Upvotes: 7