|
Hello,
Existing set up is in classic ASP the HTTP request is made as
CreateObject( "WinHttp.WinHttpRequest.5.1" )
Now, I am using C#. would you say this is a good translation of above?
WebClient wc = new WebClient();
NetworkCredential myCred = new NetworkCredential("myuser", "mypwd");
wc.Credentials = myCred;
wc.DownloadFile("http://my.location.com", @"C:\mylocation.csv");
|
|
|
|
|
A bit more on this:
CreateObject( "WinHttp.WinHttpRequest.5.1" )
Set objHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" )
sURL="http://my.location.com"
sUsername="myuser"
sPassword="mypassword"
objHTTP.Open "GET", sURL, False
objHTTP.SetCredentials sUsername, sPassword ,HTTPREQUEST_SETCREDENTIALS_FOR_SERVER
objHTTP.Send
|
|
|
|