Dim objAuth As New AuthRequest("screenname", "password")
With objAuth
.Secret = "secret answer"
.UserAgent = "Custom UA"
.Proxy = New WebProxy("127.0.0.1", 8080)
.Cookies = oldCookies
.LoginUrl = "https://www.aim.com/"
.LoginSuccessTrigger = "startSession('"
End With
Using objResponse As AuthResponse = objAuth.Login
Select Case objResponse.State
Case AuthResponse.State.ConnectionError
'handle accordingly
Case AuthResponse.State.EmptyBody
'handle accordingly
Case AuthResponse.State.Unknown
'handle accordingly
Case AuthResponse.State.Invalid
'handle accordingly
Case AuthResponse.State.Suspended
'handle accordingly
Case AuthResponse.State.Valid
'handle accordingly
End Select
Debug.Print(objResponse.Headers)
Debug.Print("")
Debug.Print(objResponse.Body)
End Using
Comments