📜  com.android.okhttp.internal.http.HttpURLConnectionImpl 无法转换为 javax.net.ssl.HttpsURLConnection - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:18.858000             🧑  作者: Mango

代码示例1
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