Visual Basic 6.0
Visual Basic 6.0
Inspect HTTP Request Header
Demonstrates theLastHeader property.
Chilkat Visual Basic 6.0 Downloads
Dim success As Long
success = 0
Dim http As New ChilkatHttp
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 ChilkatHttpResponse
success = http.HttpStr("POST",url,json,"utf-8","application/json",resp)
If (success = 0) Then
Debug.Print http.LastErrorText
Exit Sub
End If
' Examine the HTTP request header we just sent.
Debug.Print 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