B4A Question How to treat httpjob timeout? - wimpie3    Nov 10, 2021 I want to detect a timeout with httpjob.
I'm doing this:
Dim Job1 As HttpJob
Job1.Initialize(...)
Job1.Poststring(...)
Job1.GetRequest.Timeout =5000 ' 5 seconds
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log("succes")
Else
Log("failed")
End If
When I start my app without internet connec B4A Question HttpJob timeout in receiver - Erel (first post)    Jul 30, 2023 This means that the device isn't connected to the internet.
If you are making the request immediately after the device wakes up then it is possible that it wasn't connected yet. You can try to add Sleep(2000) before making the request or make another attempt if it fails. B4A Question Job.GetRequest.Timeout don´t work - Jose Cuevas    Jun 02, 2022   (1 reaction) Hi, my App consumes a REST API, but I don't want to wait more than 6 seconds for the response, I use the Job.GetRequest.Timeout = 6000, but there are many times that it waits up to 40 seconds, it doesn't respect the 6 seconds of the Job.GetRequest .Timeout. This is my code:
Dim XJob As HttpJob B4i Question Is there a timeout setting for the wait command? - Erel (first post)    Dec 12, 2022   (1 reaction) Dim j As HttpJob
...
j.Download(...) 'or any other method
j.GetRequest.Timeout = 60000
Wait For (j) JobDone(j As HttpJob) B4A Question HttpJob PostString timeout - TILogistic (first post)    Jan 22, 2022   (1 reaction) use Postman to check and identify where the problem occurs. B4A Question HTTPjob question - Erel (first post)    Jan 10, 2016   (1 reaction) The default timeout is set to 30000. I guess that the connection is successful but it then stalls for some reason.
Yes. B4A Question How to set the default HTTP connection timeout - Erel (first post)    Aug 23, 2022   (4 reactions) You can make a sub that replaces the call for Download. For example:
Public Sub Download(Callback As Object, Link As String) As HttpJob
Dim j As HttpJob
j.Initialize("", Callback)
j.Download(Link)
j.GetRequest.Timeout = 60000
Return j
End Sub
Usage:
Dim j As HttpJob = B4XPages.MainPage.Download B4A Question The HTTP JOB is stuck in timeout and user closes the activity. JobDoneEvent (FALSE) Open the Activity again - Loop - DonManfred (first post)    Jul 16, 2024   (1 reaction) Doing the httpjobs not in an Activity. Instead do them in a Service or a class initiated from a service (starter for ex). B4A Question how incrase time out of httpjob - DonManfred (first post)    Mar 10, 2015   (1 reaction) Put
j.GetRequest.Timeout = 60000
AFTER you started the download/Poststring
Dim j As HttpJob
j.Initialize("send_data", Me)
j.download(url)
j.GetRequest.Timeout = 60000 B4J Question [WORK AROUND] - detection of "silent timeouts" in http jobs - JackKirk    Oct 23, 2022   (2 reactions) res As HttpResponse)
#End If
Dim job As HttpJob = TaskIdToJob.Get(TaskId)
If job = Null Then
Log("HttpUtils2Service: job completed multiple times - " & TaskId)
Return
End If
TaskIdToJob.Remove(TaskId)
job.Success = success
job.ErrorMessage = errorMessage
#if B Page: 1   2   3   4   5   6   7   Powered by ColBERT |