Xojo Plugin
Xojo Plugin
Transition from Http.GetHead to Http.HttpNoBody
Provides instructions for replacing deprecated GetHead method calls with HttpNoBody.Chilkat Xojo Plugin Downloads
Dim success As Boolean
success = False
Dim http As New Chilkat.Http
Dim url As String
url = "https://www.example.com/"
// ------------------------------------------------------------------------
// The GetHead method is deprecated:
Dim resp1 As Chilkat.HttpResponse
resp1 = http.GetHead(url)
If (http.LastMethodSuccess = False) Then
System.DebugLog(http.LastErrorText)
Return
End If
System.DebugLog(Str(resp1.StatusCode))
// ------------------------------------------------------------------------
// Do the equivalent using HttpNoBody.
// Your application creates a new, empty response object which is passed
// in the last argument and filled with the HTTP response upon success.
Dim resp2 As New Chilkat.HttpResponse
success = http.HttpNoBody("HEAD",url,resp2)
If (success = False) Then
System.DebugLog(http.LastErrorText)
Return
End If
System.DebugLog(Str(resp2.StatusCode))