S sutipunW New Member Licensed User Mar 20, 2020 #1 I am trying to convert my B4A project to B4I. But I face a problem that I cannot set request timeout for iHttpUtils2. It is compiled OK both on local and Hosted Builder. But when run it caused error as attached. What should I do since Client's Server is a little bit slow? /
I am trying to convert my B4A project to B4I. But I face a problem that I cannot set request timeout for iHttpUtils2. It is compiled OK both on local and Hosted Builder. But when run it caused error as attached. What should I do since Client's Server is a little bit slow? /
Semen Matusovskiy Well-Known Member Licensed User Mar 20, 2020 #2 job.GetRequest.Timeout = ... Upvote 0
S sutipunW New Member Licensed User Mar 20, 2020 #3 Semen Matusovskiy said: job.GetRequest.Timeout = ... Click to expand... Dear Semen, that's what I'm doing. Pls. see attached. The one without job.GetRequest.Timeoout = no runtime error. But with the requested will cause error. Upvote 0
Semen Matusovskiy said: job.GetRequest.Timeout = ... Click to expand... Dear Semen, that's what I'm doing. Pls. see attached. The one without job.GetRequest.Timeoout = no runtime error. But with the requested will cause error.
M Mike1970 Well-Known Member Licensed User Longtime User Mar 20, 2020 #4 sutipunW said: Dear Semen, that's what I'm doing. Pls. see attached. The one without job.GetRequest.Timeoout = no runtime error. But with the requested will cause error. Click to expand... i have the same problem but I ignored it for the moment by comment that line. I'm interested in the solution too Upvote 0
sutipunW said: Dear Semen, that's what I'm doing. Pls. see attached. The one without job.GetRequest.Timeoout = no runtime error. But with the requested will cause error. Click to expand... i have the same problem but I ignored it for the moment by comment that line. I'm interested in the solution too
Semen Matusovskiy Well-Known Member Licensed User Mar 20, 2020 #5 I tried a timeout in B4i 6.50. Log file looks so. ResponseError: The request timed out., status code: 0 ErrorMessage: The request timed out. Click to expand... Attachments test.zip test.zip 4.9 KB · Views: 474 Last edited: Mar 21, 2020 Upvote 0
I tried a timeout in B4i 6.50. Log file looks so. ResponseError: The request timed out., status code: 0 ErrorMessage: The request timed out. Click to expand...
S sutipunW New Member Licensed User Mar 21, 2020 #6 Semen Matusovskiy said: I tried a timeout in B4i 6.50. Log file looks so. Click to expand... I'm also using B4i 6.50. I've tried your test.zip without error. So I Try to duplicate your work but the error is still there. So now I'm confused and lost. I have attached my test project and Logs screen. Attachments testHttpUtils.zip testHttpUtils.zip 6.9 KB · Views: 512 2020-03-21_23-19-59.png 153.1 KB · Views: 626 Upvote 0
Semen Matusovskiy said: I tried a timeout in B4i 6.50. Log file looks so. Click to expand... I'm also using B4i 6.50. I've tried your test.zip without error. So I Try to duplicate your work but the error is still there. So now I'm confused and lost. I have attached my test project and Logs screen.
Semen Matusovskiy Well-Known Member Licensed User Mar 21, 2020 #7 At first job.Download("..."). Then job.GetRequest.Timeout = ... If you set Timeout before Download, GetRequest does following Code: Copy Public Sub GetRequest As HttpRequest Return req End Sub In this moment req is not initialized yet (so GetRequest.Timeout gives an error). Exactly Download initializes req and should be first. Code: Copy Public Sub Download(Link As String) req.InitializeGet(Link) CallSubDelayed2(HttpUtils2Service, "SubmitJob", Me) End Sub I understand, why you want to correct request at first. But really it's not important. Download will not start before Wait For. Last edited: Mar 21, 2020 Upvote 0
At first job.Download("..."). Then job.GetRequest.Timeout = ... If you set Timeout before Download, GetRequest does following Code: Copy Public Sub GetRequest As HttpRequest Return req End Sub In this moment req is not initialized yet (so GetRequest.Timeout gives an error). Exactly Download initializes req and should be first. Code: Copy Public Sub Download(Link As String) req.InitializeGet(Link) CallSubDelayed2(HttpUtils2Service, "SubmitJob", Me) End Sub I understand, why you want to correct request at first. But really it's not important. Download will not start before Wait For.
S sutipunW New Member Licensed User Mar 21, 2020 #8 Semen Matusovskiy said: At first, job.Download("...") Then job.GetRequest.Timeout = ... Click to expand... Problem solved. Thank you very much, Semen. Upvote 0
Semen Matusovskiy said: At first, job.Download("...") Then job.GetRequest.Timeout = ... Click to expand... Problem solved. Thank you very much, Semen.