Hello to all,
I need to execute a GET via HTTP protocol with OkHttp with referer and user-agent parameters.
If I develop it with VB.NET it works and the server answer to me correctly, but if I try to it with B4A, with this code:
If I run this code (with correct parameters) hc_ResponseError function is call with
Reason = javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
How can I solve it ??
Thanks
Sergio
I need to execute a GET via HTTP protocol with OkHttp with referer and user-agent parameters.
If I develop it with VB.NET it works and the server answer to me correctly, but if I try to it with B4A, with this code:
B4X:
Dim hc As OkHttpClient
hc.Initialize("hc")
Dim req As OkHttpRequest
req.InitializeGet("https://MyPageToCall.com")
req.SetHeader("referer", "http://MyPageForReferer.html")
req.SetHeader("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0")
hc.Execute(req, 1)
If I run this code (with correct parameters) hc_ResponseError function is call with
Reason = javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
How can I solve it ??
Thanks
Sergio