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
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)