Sample code for 30+ languages & platforms
AutoIt

Transition from Http.GetHead to Http.HttpNoBody

Provides instructions for replacing deprecated GetHead method calls with HttpNoBody.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oHttp = ObjCreate("Chilkat.Http")
Local $sUrl = "https://www.example.com/"

; ------------------------------------------------------------------------
; The GetHead method is deprecated:

Local $oResp1 = $oHttp.GetHead($sUrl)
If ($oHttp.LastMethodSuccess = False) Then
    ConsoleWrite($oHttp.LastErrorText & @CRLF)
    Exit
EndIf

ConsoleWrite($oResp1.StatusCode & @CRLF)

; ------------------------------------------------------------------------
; Do the equivalent using HttpNoBody.
; Your application creates a new, empty response object which is passed 
; in the last argument and filled with the HTTP response upon success.

$oResp2 = ObjCreate("Chilkat.HttpResponse")
$bSuccess = $oHttp.HttpNoBody("HEAD",$sUrl,$oResp2)
If ($bSuccess = False) Then
    ConsoleWrite($oHttp.LastErrorText & @CRLF)
    Exit
EndIf

ConsoleWrite($oResp2.StatusCode & @CRLF)