Sample code for 30+ languages & platforms
AutoIt

Transition from Http.PutText to Http.HttpStr

Provides instructions for replacing deprecated PutText method calls with HttpStr.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oHttp = ObjCreate("Chilkat.Http")

Local $sVerb = "PUT"
Local $sUrl = "https://example.com/"
Local $sTextData = "This is the HTTP request body"
Local $sCharset = "utf-8"
Local $sContentType = "text/plain"

; ------------------------------------------------------------------------
; The PutText method is deprecated:

Local $sResponseBody = $oHttp.PutText($sUrl,$sTextData,$sCharset,$sContentType,False,False)
If ($oHttp.LastMethodSuccess = False) Then
    ConsoleWrite($oHttp.LastErrorText & @CRLF)
    Exit
EndIf

; ...
; ...

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

$oResponseOut = ObjCreate("Chilkat.HttpResponse")
$bSuccess = $oHttp.HttpStr($sVerb,$sUrl,$sTextData,$sCharset,$sContentType,$oResponseOut)
If ($bSuccess = False) Then
    ConsoleWrite($oHttp.LastErrorText & @CRLF)
    Exit
EndIf

$sResponseBody = $oResponseOut.BodyStr