Xojo Plugin
Xojo Plugin
Inspect HTTP Request Header
Demonstrates theLastHeader property.
Chilkat Xojo Plugin Downloads
Dim success As Boolean
success = False
Dim http As New Chilkat.Http
Dim url As String
url = "https://chilkatsoft.com/echo_request_body.asp"
Dim json As String
json = "{""greeting"":""Hello World""}"
// Send a POST with the JSON in the HTTP request body.
Dim resp As New Chilkat.HttpResponse
success = http.HttpStr("POST",url,json,"utf-8","application/json",resp)
If (success = False) Then
System.DebugLog(http.LastErrorText)
Return
End If
// Examine the HTTP request header we just sent.
System.DebugLog(http.LastHeader)
// Output:
// POST /echo_request_body.asp HTTP/1.1
// Host: chilkatsoft.com
// Accept: */*
// Accept-Encoding: gzip
// Content-Type: application/json
// Content-Length: 26