iOS Question [Solved] HttpJob error to avoid - Never fires job response

Discussion in 'iOS Questions' started by hatzisn, Apr 10, 2019.

  1. hatzisn

    hatzisn Active Member Licensed User

    Hi everyone,

    I am almost sure this is not the correct forum to post this, but I am going to do it here anyway since it is not a tutorial of something and it is not a code snippet.

    Take a look at this code:
    Code:
    Dim hj as HttpJob
    hj.Download(
    "https://www.serversomething.com")
    Wait For (hj) JobDone(job as HttpJob)
    If job.Success Then
       
    ' Do something
    Else
       
    ' Do not do something
    End If
    If it is compiled the code does not produce any errors, but it never fires the job response part.
    Did you notice what is wrong?

    I missed the part of :
    Code:
    hj.Initialize("", Me)
    If I add this line to the code and turn the code into this:
    Code:
    Dim hj as HttpJob
    hj.Initialize(
    "", Me)
    hj.Download(
    "https://www.serversomething.com")
    Wait For (hj) JobDone(job as HttpJob)
    If job.Success Then
       
    ' Do something
    Else
       
    ' Do not do something
    End If
    The job response fires and everything works ok. It bugged me very long time but finally I got that.

    I hope that someone will benefit from this,
    Cheers
     
Loading...
  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