My Android app is trying to connect to this URL:
https://data.gov.in/api/datastore/resource.json?resource_id=e16c75b6-7ee6-4ade-8e1f-2cd3043ff4c9&api-key=APIKEY
This url give JSON Data. Since the protocol is https, the normal http call don't work. Every time I tries to make a call to this server, it says:
javax.net.ssl.SSLException: SSL handshake aborted: ssl=0x65f1e9f8: I/O error during system call, Connection reset by peer
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:406)
at com.android.okhttp.Connection.upgradeToTls(Connection.java:146)
I've tried many codes but all seems to give the same error. How can I make a call to the URL above to get the JSON Data. I've no info of the server, only the URL is what I got (with an API KEY).
A working code to get the response as a string will be great.