Skip to content

Commit

Permalink
a helpful commit message (#5187)
Browse files Browse the repository at this point in the history
Co-authored-by: Rodrigo Lazo <rlazo@users.noreply.github.com>
  • Loading branch information
argzdev and rlazo authored Jul 24, 2023
1 parent 2827bac commit d86eb6f
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ internal class RemoteSettingsFetcher(
onFailure: suspend (String) -> Unit
) =
withContext(blockingDispatcher) {
val connection = settingsUrl().openConnection() as HttpsURLConnection
connection.requestMethod = "GET"
connection.setRequestProperty("Accept", "application/json")
headerOptions.forEach { connection.setRequestProperty(it.key, it.value) }

try {
val connection = settingsUrl().openConnection() as HttpsURLConnection
connection.requestMethod = "GET"
connection.setRequestProperty("Accept", "application/json")
headerOptions.forEach { connection.setRequestProperty(it.key, it.value) }

val responseCode = connection.responseCode
if (responseCode == HttpsURLConnection.HTTP_OK) {
val inputStream = connection.inputStream
Expand Down

0 comments on commit d86eb6f

Please sign in to comment.