bump Fuel version

This commit is contained in:
NikkyAI 2018-11-17 14:57:36 +01:00
parent 2091d59219
commit a2a24c6ed9
2 changed files with 8 additions and 10 deletions

View File

@ -23,10 +23,10 @@ dependencies {
compile group: 'com.google.code.gson', name: 'gson', version: '+' compile group: 'com.google.code.gson', name: 'gson', version: '+'
compile group: 'com.google.guava', name: 'guava', version: '+' compile group: 'com.google.guava', name: 'guava', version: '+'
compile(group: "com.github.NikkyAi.Fuel", name: "fuel", version: "c5239e5db9") compile(group: "com.github.NikkyAi.Fuel", name: "fuel", version: "742c73082e")
shadow(group: "com.github.NikkyAi.Fuel", name: "fuel", version: "c5239e5db9") { transitive = false } shadow(group: "com.github.NikkyAi.Fuel", name: "fuel", version: "742c73082e") { transitive = false }
compile(group: "com.github.NikkyAi.Fuel", name: "fuel-coroutines", version: "c5239e5db9") compile(group: "com.github.NikkyAi.Fuel", name: "fuel-coroutines", version: "742c73082e")
shadow(group: "com.github.NikkyAi.Fuel", name: "fuel-coroutines", version: "c5239e5db9") { transitive = false } shadow(group: "com.github.NikkyAi.Fuel", name: "fuel-coroutines", version: "742c73082e") { transitive = false }
compile(group: 'com.github.kittinunf.result', name: 'result', version: resultVersion) compile(group: 'com.github.kittinunf.result', name: 'result', version: resultVersion)
shadow(group: 'com.github.kittinunf.result', name: 'result', version: resultVersion) { transitive = false } shadow(group: 'com.github.kittinunf.result', name: 'result', version: resultVersion) { transitive = false }

View File

@ -1,9 +1,11 @@
package matterlink.api package matterlink.api
import awaitStringResponse
import com.github.kittinunf.fuel.core.FuelManager import com.github.kittinunf.fuel.core.FuelManager
import com.github.kittinunf.fuel.core.Method import com.github.kittinunf.fuel.core.Method
import com.github.kittinunf.fuel.core.ResponseDeserializable import com.github.kittinunf.fuel.core.ResponseDeserializable
import com.github.kittinunf.fuel.core.extensions.cUrlString
import com.github.kittinunf.fuel.core.extensions.jsonBody
import com.github.kittinunf.fuel.coroutines.awaitStringResponseResult
import com.github.kittinunf.fuel.httpGet import com.github.kittinunf.fuel.httpGet
import com.github.kittinunf.fuel.httpPost import com.github.kittinunf.fuel.httpPost
import com.github.kittinunf.result.Result import com.github.kittinunf.result.Result
@ -21,13 +23,10 @@ import kotlinx.coroutines.delay
import kotlinx.coroutines.isActive import kotlinx.coroutines.isActive
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import kotlinx.io.IOException
import kotlinx.serialization.json.JSON import kotlinx.serialization.json.JSON
import kotlinx.serialization.list import kotlinx.serialization.list
import matterlink.Logger import matterlink.Logger
import java.io.Reader import java.io.Reader
import java.net.ConnectException
import java.net.MalformedURLException
import kotlin.coroutines.CoroutineContext import kotlin.coroutines.CoroutineContext
/** /**
@ -103,8 +102,7 @@ open class MessageHandler : CoroutineScope {
headers["Authorization"] = "Bearer ${config.token}" headers["Authorization"] = "Bearer ${config.token}"
} }
} }
// .awaitStringResponse() .awaitStringResponseResult()
.responseString()
when (result) { when (result) {
is Result.Success -> { is Result.Success -> {