I'm using a WebRequest in VB6 and I have the timeouts set at "5000" (5 seconds), but even after 5 seconds it is not timing out, any help is appreciated.
x:
Dim objWinHTTP
Set objWinHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
objWinHTTP.Open "POST", "http://twitter.com/" & TwitterUSERNAME
objWinHTTP.SetTimeouts 5000, 5000, 5000, 5000
Call objWinHTTP.Send(psData)
MsgBox (objWinHTTP.Status)
If objWinHTTP.Status <> 200 Then
Timer.Enabled = False
MsgBox ("D:")
GoTo x
End If
you should set objWinHTTP.SetTimeouts
before objWinHTTP.Open
and the four parameters you set for objWinHTTP.SetTimeouts are
Resolve, Connect, Send and Receive
So each value should be set according to that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With