Skip to content
Snippets Groups Projects
Verified Commit 49086dc5 authored by Ruben van Dijk's avatar Ruben van Dijk
Browse files

bit more logging.

parent a75cb2a0
Branches
No related tags found
No related merge requests found
Pipeline #1942 passed
......@@ -17,7 +17,11 @@ abstract class DataProvider {
fun getResponse(http: CustomHttp, storage: SharedPreferences): Map<String, Any> = try {
if(storage.getBoolean("offline", false)) throw Exception("forced offline!")
val response: MutableMap<String, Any> = mutableMapOf("Last downloaded: "+ DateFormat.getDateTimeInstance().format(Date()) to listOf<String>())
response.putAll(getData(http.get(url).only200().text()))
val httpResponse = http.get(url).only200().text()
println("httpResponse: $httpResponse")
val data = getData(httpResponse)
println("data: $data")
response.putAll(data)
with(storage.edit()) {
putString(url, Gson().toJson(response))
apply()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment