![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) Example: Http.ClearHeaders methodDemonstrates how to call the ClearHeaders method. Also see: Chilkat Http Default and Auto-Filled Headers
Use ChilkatAx-win32.pkg Procedure Test Boolean iSuccess Handle hoHttp String sResponseBody String sTemp1 Move False To iSuccess Get Create (RefClass(cComChilkatHttp)) To hoHttp If (Not(IsComObjectCreated(hoHttp))) Begin Send CreateComObject of hoHttp End // Add a request header. Send ComSetRequestHeader To hoHttp "X-Something" "1234" Send ComSetRequestHeader To hoHttp "X-Example" "5678" Get ComQuickGetStr Of hoHttp "https://chilkatsoft.com/helloWorld.txt" To sResponseBody // Examine the request header we just sent.. Get ComLastHeader Of hoHttp To sTemp1 Showln sTemp1 Showln "----" // Output: // GET /helloWorld.txt HTTP/1.1 // Host: chilkatsoft.com // Accept: */* // Accept-Encoding: gzip // X-Something: 1234 // X-Example: 5678 // Remove the request headers we previously added: Send ComClearHeaders To hoHttp Get ComQuickGetStr Of hoHttp "https://chilkatsoft.com/helloWorld.txt" To sResponseBody Get ComLastHeader Of hoHttp To sTemp1 Showln sTemp1 // Output: // GET /helloWorld.txt HTTP/1.1 // Host: chilkatsoft.com // Accept: */* // Accept-Encoding: gzip End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.