Sample code for 30+ languages & platforms
VB.NET

Transition from Http.PutText to Http.HttpStr

Provides instructions for replacing deprecated PutText method calls with HttpStr.

Chilkat VB.NET Downloads

VB.NET
Dim success As Boolean = False

Dim http As New Chilkat.Http

Dim verb As String = "PUT"
Dim url As String = "https://example.com/"
Dim textData As String = "This is the HTTP request body"
Dim charset As String = "utf-8"
Dim contentType As String = "text/plain"

' ------------------------------------------------------------------------
' The PutText method is deprecated:

Dim responseBody As String = http.PutText(url,textData,charset,contentType,False,False)
If (http.LastMethodSuccess = False) Then
    Debug.WriteLine(http.LastErrorText)
    Exit Sub
End If


' ...
' ...

' ------------------------------------------------------------------------
' Do the equivalent using HttpStr.
' Your application creates a new, empty HttpResponse object which is passed 
' in the last argument and filled upon success.

Dim responseOut As New Chilkat.HttpResponse
success = http.HttpStr(verb,url,textData,charset,contentType,responseOut)
If (success = False) Then
    Debug.WriteLine(http.LastErrorText)
    Exit Sub
End If


responseBody = responseOut.BodyStr