Chilkat HOME Android™ ASP Visual Basic VB.NET C# iOS (IPhone) Objective-C C++ C Unicode C++ Unicode C MFC Delphi DLL Delphi ActiveX FoxPro Java Perl PHP Extension PHP ActiveX Python PowerShell Ruby SQL Server VBScript
Check File Size using HEAD RequestDemonstrates how to quickly check the size of an HTTP download by using the HEAD request. Dim http As New ChilkatHttp Dim success As Long ' Any string unlocks the component for the 1st 30-days. success = http.UnlockComponent("Anything for 30-day trial") If (success <> 1) Then MsgBox http.LastErrorText Exit Sub End If ' Send a HEAD request to get the response header: Dim response As ChilkatHttpResponse Set response = http.GetHead("http://www.chilkatsoft.com/download/ChilkatDotNet2.msi") If (response Is Nothing ) Then MsgBox http.LastErrorText Else ' The ContentLength property of the HTTP response is ' the size of the remote file: Text1.Text = Text1.Text & "Size of download = " _ & response.ContentLength & vbCrLf End If |
© 2000-2013 Chilkat Software, Inc. All Rights Reserved.