Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) Send HTTPS Get Without Waiting for the ResponseThis example demonstrates sending an HTTP GET request without waiting for the response.
Use ChilkatAx-win32.pkg Procedure Test Handle hoRest Boolean iBAutoReconnect Boolean iSuccess Integer iMaxWaitMs String sTemp1 // This example assumes the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. Get Create (RefClass(cComChilkatRest)) To hoRest If (Not(IsComObjectCreated(hoRest))) Begin Send CreateComObject of hoRest End // Connect to the server using TLS Move False To iBAutoReconnect Get ComConnect Of hoRest "example.com" 443 True iBAutoReconnect To iSuccess If (iSuccess = False) Begin Get ComLastErrorText Of hoRest To sTemp1 Showln sTemp1 Procedure_Return End // Send a GET request to https://example.com/some/path Get ComSendReqNoBody Of hoRest "GET" "/some/path" To iSuccess If (iSuccess = False) Begin Get ComLastErrorText Of hoRest To sTemp1 Showln sTemp1 Procedure_Return End // OK, the request was sent. // Close the connection. Move 50 To iMaxWaitMs Get ComDisconnect Of hoRest iMaxWaitMs To iSuccess Showln "GET Request Sent." End_Procedure |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.