Is there any library in dotnet that transforms a 'normal' request string to a proper request?
Something that would automate things like
client.Headers.[HttpRequestHeader.Authorization] <- "Basic " + un + ":" + pw;
Is there any library in dotnet that transforms a 'normal' request string to a proper request?
Something that would automate things like
client.Headers.[HttpRequestHeader.Authorization] <- "Basic " + un + ":" + pw;
For HttpWebRequest
and WebClient
, there is the Credentials
property. You can write:
client.Credentials = new NetworkCredential("username", "password");
Don't know of anything similar for use with HttpClient
.
If you're just writing a script, why can't you just use curl? It works in windows. http://curl.haxx.se/download.html