(AutoIt) Transition from Http.QuickGetObj to Http.HttpNoBody
Provides instructions for replacing deprecated QuickGetObj method calls with HttpNoBody. Note: This example requires Chilkat v11.0.0 or greater.
$oHttp = ObjCreate("Chilkat.Http")
Local $sUrl = "https://example.com/"
; ------------------------------------------------------------------------
; The QuickGetObj method is deprecated:
Local $oResponseObj = $oHttp.QuickGetObj($sUrl)
If ($oHttp.LastMethodSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
; ...
; ...
; ------------------------------------------------------------------------
; Do the equivalent using HttpNoBody.
; Your application creates a new, empty HttpResponse object which is passed
; in the last argument and filled upon success.
$oResponseOut = ObjCreate("Chilkat.HttpResponse")
Local $bSuccess = $oHttp.HttpNoBody("GET",$sUrl,$oResponseOut)
If ($bSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
|