My apps require trigger multiple http download & I'm hit with occassionaly "timeout -1" problems on device, strange that it doesn't happen on desktop.
Upon a search on forum, I noted quite a numbers of forumer reported such issue & some solution is to extend the timeout.
But now I realized the actual problem, I was following the sample in the help file for both GetAsyncString & GetAsyncStream, & it does not include
response.close, which may cause problem when initiate the 2nd download, which causes timeout, but most likely will success again when try for the 3rd time.
You may want to include it in the sample in yr next release
---------------
//GetAsyncString
Sub Globals
URL = "http://www.basic4ppc.com"
End Sub
Sub App_Start
Form1.Show
request.New1(URL)
response.New1
request.GetAsyncResponse
End Sub
Sub request_Response
If request.ResponseCode = 200 Then '200 is the code of successful connections.
response.Value = request.AsyncResponse
response.GetAsyncString
Else
Msgbox("Error getting response: " & request.ErrorMessage & CRLF _
& "Response code: " & request.ResponseCode)
End If
End Sub
Sub response_Stream
response.close
TextBox1.Text = response.AsyncString
End Sub