Android Question HTTP timeout

Discussion in 'Android Questions' started by Derek Jee, May 27, 2015.

  1. Derek Jee

    Derek Jee Active Member Licensed User

    Hi there

    If I set a timeout on my HTTP request, how can I check if it has timed out and if the job actually comes back in after the time out what will happen to it..

    Many thanks,

  2. Peter Simpson

    Peter Simpson Expert Licensed User

    I could be wrong, but if you are using HTTP then I would presume that a time out would appear in
    _ResponseError(Response As HttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
  3. Derek Jee

    Derek Jee Active Member Licensed User

    Thank you Peter

    I wanted to test it for myself but my wifi is not working right now and my android device is not cellular.. I will hopefully get it working to test what your suggestion gives me in terms of timing out..

    Thank you,

  4. Erel

    Erel Administrator Staff Member Licensed User

    I recommend you to use HttpUtils2. The job will be aborted when because of the time out. You can then check the value of Job.ErrorMessage.
    Peter Simpson likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice