Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:networkSecurityConfig="@xml/ssl_verify_skip"><!--MUST NOT USE 'SSL VERIFY SKIP' ON PRODUCTION!-->
<activity
android:name=".ui.activities.MainActivity"
android:label="@string/app_name">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ForecastByZipCodeRequest(private val zipCode: Long, val gson: Gson = Gson(

companion object {
private const val APP_ID = "15646a06818f61f7b8d7823ca833e1ce"
private const val URL = "http://api.openweathermap.org/data/2.5/forecast/daily?mode=json&units=metric&cnt=7"
private const val URL = "https://api.openweathermap.org/data/2.5/forecast/daily?mode=json&units=metric&cnt=7"
private const val COMPLETE_URL = "$URL&APPID=$APP_ID&zip="
}

Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/xml/ssl_verify_skip.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<!--MUST NOT USE 'SSL VERIFY SKIP' ON PRODUCTION! -->
<domain includeSubdomains="true">api.openweathermap.org</domain>
</domain-config>
</network-security-config>