AutoIt
AutoIt
Example: Http.QuickGetStr method
Demonstrates theQuickGetStr method.
Chilkat AutoIt Downloads
$oHttp = ObjCreate("Chilkat.Http")
; Keep the response body if there's an error.
$oHttp.KeepResponseBody = True
; Send the HTTP GET and return the content in a string.
Local $str = $oHttp.QuickGetStr("https://www.chilkatsoft.com/helloWorld.json")
If ($oHttp.LastMethodSuccess = False) Then
If ($oHttp.LastStatus = 0) Then
; Communications error. We did not get a response.
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Else
ConsoleWrite("Response status code: " & $oHttp.LastStatus & @CRLF)
ConsoleWrite("Response body error text:" & @CRLF)
ConsoleWrite($oHttp.LastResponseBody & @CRLF)
EndIf
Exit
EndIf
ConsoleWrite($str & @CRLF)
ConsoleWrite("Success" & @CRLF)