This method downloads a file from an Http server specifying the potocol scheme, the host name, the remote URI, and a local filename.
[Visual Basic] Public Function
HttpDownloadFile(ByVal scheme As String, ByVal remoteHost As
String, ByVal remotePath As String, ByVal localFileName As String)
As Boolean
[C#] public bool HttpDownloadFile(string
scheme, string remoteHost, string remotePath, string
localFileName);
Parameters
scheme
Internet access protocol ("http" or "https")
remoteHost
Domain name in DNS style, or IP address
remotePath
The name of the remote path
localFileName
Local file name
Return Value
Returns True if successful. Returns False if successful.
Explanation
The HttpDownloadFile method downloads a file from an Http server specifying the potocol scheme, the host name, the remote URI, and a local filename.
This method is effective for the HTTP or HTTPS protocol.
Example
[Visual Basic.NET] Dim Ret As Boolean 'Username and password ImageKit.File.HttpCredentials = New NetworkCredential("user", "password") 'Downloads the file Ret = ImageKit.File.HttpDownloadFile("http", "www.newtone.co.jp", "test/test.jpg", @"c:\test\test.jpg") [Visual C#.NET] bool Ret; //Username and password ImageKit.File.HttpCredentials = new NetworkCredential("user", "password"); //Downloads the file Ret = ImageKit.File.HttpDownloadFile("http", "www.newtone.co.jp", "test/test.jpg", @"c:\test\test.jpg");