Sample code for 30+ languages & platforms
AutoIt

Send HTTPS Get Without Waiting for the Response

See more REST Examples

This example demonstrates sending an HTTP GET request without waiting for the response.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.

$oRest = ObjCreate("Chilkat.Rest")

; Connect to the server using TLS
Local $bAutoReconnect = False
$bSuccess = $oRest.Connect("example.com",443,True,$bAutoReconnect)
If ($bSuccess = False) Then
    ConsoleWrite($oRest.LastErrorText & @CRLF)
    Exit
EndIf

; Send a GET request to https://example.com/some/path 
$bSuccess = $oRest.SendReqNoBody("GET","/some/path")
If ($bSuccess = False) Then
    ConsoleWrite($oRest.LastErrorText & @CRLF)
    Exit
EndIf

; OK, the request was sent.
; Close the connection.
Local $iMaxWaitMs = 50
$oRest.Disconnect($iMaxWaitMs)

ConsoleWrite("GET Request Sent." & @CRLF)