Sample code for 30+ languages & platforms
AutoIt

Inspect HTTP Request Header

Demonstrates the LastHeader property.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oHttp = ObjCreate("Chilkat.Http")

Local $sUrl = "https://chilkatsoft.com/echo_request_body.asp"
Local $sJson = "{""greeting"":""Hello World""}"

;  Send a POST with the JSON in the HTTP request body.
$oResp = ObjCreate("Chilkat.HttpResponse")
$bSuccess = $oHttp.HttpStr("POST",$sUrl,$sJson,"utf-8","application/json",$oResp)
If ($bSuccess = False) Then
    ConsoleWrite($oHttp.LastErrorText & @CRLF)
    Exit
EndIf

;  Examine the HTTP request header we just sent.
ConsoleWrite($oHttp.LastHeader & @CRLF)

;  Output:

;  POST /echo_request_body.asp HTTP/1.1
;  Host: chilkatsoft.com
;  Accept: */*
;  Accept-Encoding: gzip
;  Content-Type: application/json
;  Content-Length: 26