Android Question Resoled HttpUtils2 handle sessions??

invaderwt

Member
Licensed User
Longtime User
B4X:
Sub Button1_Click
    Log("enter")
Dim job1 As HttpJob
         job1.Initialize("Job1", Me)
       job1.PostString(urlBase &"//sign_in", "user="&EditText1.Text&" &password="&EditText2.Text&"")
      
End Sub


Sub JobDone (Job As HttpJob)
   Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
   If Job.Success = True Then
      Select Job.JobName
         Case "Job1"
          
            Log(Job.GetString)
        Case "Job2"
            Log(Job.GetString)
       
      End Select
   Else
      Log("Error: " & Job.ErrorMessage)
      ToastMessageShow("Error: " & Job.ErrorMessage, True)
   End If
   Job.Release
End Sub
When I try acesses the resource with the same job enter in loop when I tired with other the don´t found the cache, how i would manage this?
B4X:
Sub Button2_Click
        Dim job2 As HttpJob
         'print the result to the logs
         job2.Initialize("Job1", Me)
            job2.PostString(urlBase &"stores.json","email="&EditText1.Text&" &password="&EditText2.Text&"")
End Sub


I need login (ok , it´s already work) and send a new page with the json ( I don´t know how do that using the cache)
 
Top