Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

com.android.okhttp.internal.http.HttpURLConnectionImpl cannot be cast to javax.net.ssl.HttpsURLConnection

Method 1: Your urlString must begin with 
https:// and not http:// for you to be able to cast it to a HttpsURLConnection.


Method 2: if your urlString starts with 
http://, changing HttpsURLConnection to HttpURLConnection should work
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #cast
ADD COMMENT
Topic
Name
7+3 =