Thank you for your comments, but it really works. Only discontinuously
It is an SSL certificate purchased from the ISP provider and valid for one year.
If the problem were the certificate, it would never work.
With http has worked for a long time without any problem.
Trying https did not work until I changed okhttputils2 per code, as described by Erel.
Now it works, but 10 times I use the code, in six it works fine and in 4 it fails, giving this error:
ResponseError. Reason: javax.net.ssl.SSLException: SSL handshake aborted: ssl=0x62b530b0: I/O error during system call, Connection reset by peer, Response:
The connection is with a PHP file to extract data from MySql.
The code used to connect is:
Dim job As HttpJob
Dim Valors As Map
Valors.Initialize
Valors.Put("p1",23)
Valors.Put("p2",User)
job.Initialize("Enter", Me)
DBF="https://xxx.yyyyyy.com/test.php"
job.PostMultipart(DBF,Valors,Null)
Wait For (job) JobDone(job As HttpJob)
If job.Success Then
Dim Res As String
Res = job.GetString
Log(Res)
Dim parser As JSONParser
parser.Initialize(Res)
Dim l As List
l.Initialize
l = parser.NextArray 'returns a list with maps
End If
Else
ToastMessageShow("Error",True)
End If
job.release
The same PHP accessed from a web page with https works perfectly always.
The connection from the app works, but it is not stable. My question is whether someone has had this discontinuous functioning problem or knows of any solution.
Thank you very much