Skip to content

Commit f91396c

Browse files
committed
change to https connection
1 parent fed9fe0 commit f91396c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/java/com/example/ludditeinstaller/ApiService.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ import kotlinx.coroutines.withContext
55
import org.json.JSONArray
66
import java.net.HttpURLConnection
77
import java.net.URL
8+
import javax.net.ssl.HttpsURLConnection
89

910
class ApiService {
1011
private val apiUrl = "https://download.luddite-os.ch/api/apks"
1112

1213
suspend fun fetchApps(): List<ApkFile> = withContext(Dispatchers.IO) {
1314
try {
1415
val url = URL(apiUrl)
15-
val connection = url.openConnection() as HttpURLConnection
16+
val connection = url.openConnection() as HttpsURLConnection
1617
connection.requestMethod = "GET"
1718
connection.setRequestProperty("X-API-Key", BuildConfig.API_KEY)
1819

0 commit comments

Comments
 (0)