Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
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. Download: Chilkat .NET Assemblies Dim http As New Chilkat.Http() Dim success As Boolean ' Any string unlocks the component for the 1st 30-days. success = http.UnlockComponent("Anything for 30-day trial") If (success <> true) Then MsgBox(http.LastErrorText) Exit Sub End If ' Send a HEAD request to get the response header: Dim response As Chilkat.HttpResponse 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: TextBox1.Text = TextBox1.Text & "Size of download = " _ & response.ContentLength & vbCrLf End If |
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.