(Lianja) Send HTTPS Get Without Waiting for the Response
This example demonstrates sending an HTTP GET request without waiting for the response.
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loRest = createobject("CkRest")
// Connect to the server using TLS
llBAutoReconnect = .F.
llSuccess = loRest.Connect("example.com",443,.T.,llBAutoReconnect)
if (llSuccess = .F.) then
? loRest.LastErrorText
release loRest
return
endif
// Send a GET request to https://example.com/some/path
llSuccess = loRest.SendReqNoBody("GET","/some/path")
if (llSuccess = .F.) then
? loRest.LastErrorText
release loRest
return
endif
// OK, the request was sent.
// Close the connection.
lnMaxWaitMs = 50
loRest.Disconnect(lnMaxWaitMs)
? "GET Request Sent."
release loRest
|