Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
HTTP HEAD RequestSimple HTTP HEAD request to download only the HTTP header. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <% set http = Server.CreateObject("Chilkat.Http") ' Any string unlocks the component for the 1st 30-days. success = http.UnlockComponent("Anything for 30-day trial") If (success <> 1) Then Response.Write http.LastErrorText & "<br>" End If ' Send the HEAD request and get the response. Set response = http.GetHead("http://www.chilkatsoft.com/") If (response Is Nothing ) Then Response.Write http.LastErrorText & "<br>" Else ' Show the HTTP response code and header received. Response.Write Server.HTMLEncode( "HTTP response code: ") & "<br>" Response.Write Server.HTMLEncode( response.StatusCode) & "<br>" Response.Write Server.HTMLEncode( "---- FULL HEADER ----") & "<br>" Response.Write Server.HTMLEncode( response.Header) & "<br>" Response.Write Server.HTMLEncode( "---------------------") & "<br>" ' How big will the full response be? This is a good way to ' check the size of a download (if the URL is a .zip) Response.Write Server.HTMLEncode( "Size of resource = " _ & response.ContentLength) & "<br>" End If %> </body> </html> |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.