Why does b4i refuse to establish connection to MySql server? whether remote one or local host, by using the iHttp and iHttpUtils libraries?
..what is wrong?
..what is wrong?
B4X:
Process_Globals
.
.
.
Dim iJob As HttpJob
End Sub
Sub connect()
.
.
iJob.Initialize("MyJob",Me)
.
.
iJob.Download2("https://192.168.0.21/DBDir/phpfile.php",Array As String( "key1","val1", "key2","val1","key3","val3") )
iJob.GetRequest.SetContentType("text/plain")
End sub
Sub JobDone(Job as HttpJob)
If Job.Success Then
Dim res As String
res = Job.GetString
Dim parser As JSONParser
parser.Initialize(res)
Select Job.JobName
Case "MyJob"
Dim NAMES As List= parser.NextArray 'returns a list with maps
For i = 0 To NAMES.Size - 1
Dim m As Map
m = NAMES.Get(i)
'.....
log(m.Get("index"))
Next
End Select
Else
Log("Error ocurred:" & Job.ErrorMessage)
End If
Job.Release
.
.
End Sub