HEAD
The HEAD method
requests a URL using the HEAD method.
The Content or ContentToFile property will return empty with this method.
Syntax
HEAD(URL)
Parameters
-
URL
-
The URL to request.
Return Values
Empty if the URL is successfully requested, or an error message.
Example
The following requests a URL:
<% Set OCXHttp = Server.CreateObject("OCXHTTP.OCXHttpCtrl.1") %>
result = OCXHttp.HEAD("http://www.flicks.com/scripts/debug.asp")
%>
<% If "" = result Then %>
Succesfully requested file.
<% Else %>
Could not request file because: <%= result %>
<% End If %>
Notes
-
SSL: to access a url with Secure Socket Layer, specify the SSL protocol https
in the
URL as follows:
result = OCXHttp.HEAD("https://www.flicks.com/scripts/debug.asp")
-
Basic Authentication: to access a url
that is protected with Basic Authentication, specify the username and password
in the
URL as follows:
result = OCXHttp.HEAD("http://username:password@www.somesite.com/membersOnly/ ")
-
Different Ports: to access a url
that is not on the default port 80, specify the port
in the
URL as follows:
result = OCXHttp.HEAD("http://www.somesite.com:81/membersOnly/ ")
-
Applies To
OCXHttp ASP Component