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
Examine HTTP Request and Response HeadersDemonstrates how to examine the HTTP request and response headers after doing an HTTP GET (also works for POST, PUT, DELETE, etc.)
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <% set http = Server.CreateObject("Chilkat_9_5_0.Http") ' Any string unlocks the component for the 1st 30-days. success = http.UnlockComponent("Anything for 30-day trial") If (success <> 1) Then Response.Write "<pre>" & Server.HTMLEncode( http.LastErrorText) & "</pre>" End If ' Send the HTTP GET and return the content in a string. ' (cknotes.com is the Chilkat blog.) html = http.QuickGetStr("http://www.cknotes.com/") If (html = vbNullString ) Then Response.Write "<pre>" & Server.HTMLEncode( http.LastErrorText) & "</pre>" End If ' This example is about examining the request/response headers, so we're ignoring the html received... ' Show the HTTP request header: Response.Write "<pre>" & Server.HTMLEncode( http.LastHeader) & "</pre>" ' Show the HTTP response header: Response.Write "<pre>" & Server.HTMLEncode( http.LastResponseHeader) & "</pre>" %> </body> </html> |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.