VB.NET
VB.NET
HTTP Post XML
Demonstrates how to POST XML to a website.Chilkat VB.NET Downloads
Dim success As Boolean = False
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Dim http As New Chilkat.Http
' Make sure to replace the URL with something real...
Dim url As String = "https://example.com/example.asp"
Dim xmlBody As String = "<test>This is the XML to be sent</test>"
Dim resp As New Chilkat.HttpResponse
success = http.HttpStr("POST",url,xmlBody,"utf-8","application/xml",resp)
If (success = False) Then
Debug.WriteLine(http.LastErrorText)
Exit Sub
End If
' Examine the body of the response.
Debug.WriteLine(resp.BodyStr)