Sub Conecta(Nada As Byte)
Log("Conectando...")
HttpJob.Initialize("Leer")
HttpJob.Download("
https://ota-puerta.000webhostapp.com/ICDOOR06")
End Sub
'
Sub JobDone (Job As JobResult)
Log("*******************************")
Log("JobName: ", Job.JobName)
If Job.Success Then
Log("Response: ", bc.SubString2(Job.Response, 0, Min(200, Job.Response.Length))) 'truncate to 200 characters
If Job.JobName = "Leer" Then
Log("JobStatus=",Job.Status)
'send another request
'This time it is a POST request and we set the Content-Type header
HttpJob.Initialize("Example2")
'add headers before calling Post or Download (this is different than the standard HttpUtils2 library).
HttpJob.AddHeader("Content-Type", "application/x-www-form-urlencoded")
HttpJob.Post("
https://www.b4x.com/print.php?key1=value1", "PostKey1=PostValue2&abc=def")
End If
Else
Log("ErrorMessage: ", Job.ErrorMessage)
Log("Status: ", Job.Status)
Log(Job.Response)
CallSubPlus("Conecta",5000,0)
End If
End Sub